Avoid harmless signed/unsigned warning in g++ 5.4 wxGTK build
Change GTKGetEntryTextLength() to return a signed value, as it's always either assigned to or compared with the signed variables anyhow. This avoids a couple of -Wsign-compare warnings when building with g++ 5.4 from Ubuntu 16.04.
This commit is contained in:
@@ -84,7 +84,7 @@ protected:
|
||||
// Override the base class method to use GtkEntry IM context.
|
||||
virtual int GTKIMFilterKeypress(GdkEventKey* event) const;
|
||||
|
||||
static unsigned int GTKGetEntryTextLength(GtkEntry* entry);
|
||||
static int GTKGetEntryTextLength(GtkEntry* entry);
|
||||
|
||||
private:
|
||||
// implement this to return the associated GtkEntry or another widget
|
||||
|
@@ -41,7 +41,7 @@
|
||||
// helper function to get the length of the text
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static unsigned int GetEntryTextLength(GtkEntry* entry)
|
||||
static int GetEntryTextLength(GtkEntry* entry)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(2, 14, 0)
|
||||
if ( wx_is_at_least_gtk2(14) )
|
||||
@@ -582,7 +582,7 @@ void wxTextEntry::Remove(long from, long to)
|
||||
}
|
||||
|
||||
// static
|
||||
unsigned int wxTextEntry::GTKGetEntryTextLength(GtkEntry* entry)
|
||||
int wxTextEntry::GTKGetEntryTextLength(GtkEntry* entry)
|
||||
{
|
||||
return GetEntryTextLength(entry);
|
||||
}
|
||||
|
Reference in New Issue
Block a user