souvarine
04-01-2010 21:41:25
When using MyGUI 2.2.3 with Gcc I get this warning
Looking in MyGUI_TextView.h at line 35
the constructor initialise offset after count even though they are declared in reverse order in the struct. Gcc is picky on details like that. Changing the constructor to
would remove the warning.
Regards,
Souvarine.
/usr/local/include/MYGUI/MyGUI_TextView.h: In constructor ‘MyGUI::LineInfo::LineInfo()’:
/usr/local/include/MYGUI/MyGUI_TextView.h:41: warning: ‘MyGUI::LineInfo::count’ will be initialized after
/usr/local/include/MYGUI/MyGUI_TextView.h:40: warning: ‘int MyGUI::LineInfo::offset’
/usr/local/include/MYGUI/MyGUI_TextView.h:37: warning: when initialized here
Looking in MyGUI_TextView.h at line 35
struct LineInfo
{
LineInfo() : width(0), count(0), offset(0) { }
void clear() { width = 0; count = 0; simbols.clear(); offset = 0; }
int width;
int offset;
size_t count;
VectorCharInfo simbols;
};
the constructor initialise offset after count even though they are declared in reverse order in the struct. Gcc is picky on details like that. Changing the constructor to
LineInfo() : width(0), offset(0), count(0) { }
would remove the warning.
Regards,
Souvarine.