Fix harmless signed/unsigned comparison warning

Cast line index to size_t after checking that it is positive to avoid
-Wsign-compare from gcc 8.3.
This commit is contained in:
Vadim Zeitlin
2019-10-30 14:13:22 +01:00
parent 94ac1bbc85
commit d076859040

View File

@@ -1684,7 +1684,7 @@ int wxTextCtrl::GetLineLength(wxTextCoord line) const
}
else // multiline
{
if ( line < 0 || line >= GetLineCount() )
if ( line < 0 || (size_t)line >= GetLineCount() )
return -1;
return GetLines()[line].length();