ensure row >= GetRowCount() if GetLineAt reaches invalid item

refactored method structure for better readability
This commit is contained in:
jensgoe
2018-12-19 20:45:00 +01:00
parent 1f0e32e485
commit 7ab9e992b6
2 changed files with 56 additions and 48 deletions

View File

@@ -134,6 +134,7 @@ public:
bool GetLineStart(unsigned int row, int& start);
bool GetLineHeight(unsigned int row, int& height);
bool GetLineAt(int y, unsigned int& row);
bool GetLineInfo(unsigned int row, int &start, int &height);
void Put(unsigned int row, int height);
@@ -146,8 +147,6 @@ public:
void Clear();
private:
bool GetLineInfo(unsigned int row, int &start, int &height);
HeightToRowRangesMap m_heightToRowRange;
};