WidgetSet: in ctor memory of array m_widgets was initialized to 0's with memset. that was
ok until my last change of Widget. now Widget has std::string's as members, so initializing like that is not possible anymore .. my debian crashed there .. added an initialization-list to Widget's ctor git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1239 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9d89de895e
commit
0f54de64aa
@ -39,9 +39,6 @@ WidgetSet::WidgetSet()
|
|||||||
m_radius = S/60;
|
m_radius = S/60;
|
||||||
|
|
||||||
init_fonts();
|
init_fonts();
|
||||||
|
|
||||||
memset(m_widgets, 0, sizeof (Widget) * MAX_WIDGETS);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -107,6 +107,11 @@ const GLfloat gui_gry[4] = { 0.3f, 0.3f, 0.3f, 1.0f };
|
|||||||
|
|
||||||
struct Widget
|
struct Widget
|
||||||
{
|
{
|
||||||
|
Widget() :
|
||||||
|
type(0), token(0), value(0), size(0), rect(0), x(0), y(0), w(0), h(0),
|
||||||
|
yOffset(0), car(0), cdr(0), _text(""), count_text(""), text_width(0),
|
||||||
|
text_img(0), rect_obj(0), color0(NULL), color1(NULL), scale(0.0f) {}
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
int token;//The token is a number supplied by the programmer to name
|
int token;//The token is a number supplied by the programmer to name
|
||||||
//recognize a widget. You could also store the id, but
|
//recognize a widget. You could also store the id, but
|
||||||
|
Loading…
x
Reference in New Issue
Block a user