From 013cacee4d832d4aae2c62370a75df633e7a0bb1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 May 2020 20:55:31 +0200 Subject: [PATCH] Don't use unsigned variables for pixel values This is not a good idea because we really don't want them to wrap around and it also provokes signed/unsigned comparison warnings when using them. Also make this variable and the other related one const. --- src/generic/datavgen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 6bf4ffbd94..62470e0a10 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2162,8 +2162,8 @@ wxDataViewMainWindow::DropItemInfo wxDataViewMainWindow::GetDropItemInfo(const w dropItemInfo.m_item = node->GetItem(); - unsigned int itemStart = GetLineStart(row); - int itemHeight = GetLineHeight(row); + const int itemStart = GetLineStart(row); + const int itemHeight = GetLineHeight(row); bool insertAbove = yy - itemStart < itemHeight*0.15; // 15%, TODO: configurable if (insertAbove)