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.
This commit is contained in:
Vadim Zeitlin
2020-05-03 20:55:31 +02:00
parent 403a8ed115
commit 013cacee4d

View File

@@ -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)