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:
@@ -1684,7 +1684,7 @@ int wxTextCtrl::GetLineLength(wxTextCoord line) const
|
|||||||
}
|
}
|
||||||
else // multiline
|
else // multiline
|
||||||
{
|
{
|
||||||
if ( line < 0 || line >= GetLineCount() )
|
if ( line < 0 || (size_t)line >= GetLineCount() )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return GetLines()[line].length();
|
return GetLines()[line].length();
|
||||||
|
Reference in New Issue
Block a user