Permalink
Browse files

Initialize LabelInfo with sane default values

  • Loading branch information...
AMDmi3 committed Sep 13, 2012
1 parent bd8e43a commit 3e46b9c4a0eca018c889a21fc756ca019900052b
Showing with 7 additions and 2 deletions.
  1. +3 −0 src/WidgetLabel.cpp
  2. +4 −2 src/WidgetLabel.h
View
@@ -28,6 +28,9 @@ FLARE. If not, see http://www.gnu.org/licenses/
using namespace std;
+LabelInfo::LabelInfo() : x(0), y(0), justify(JUSTIFY_LEFT), valign(VALIGN_TOP), hidden(false) {
+}
+
/**
* This is used in menus (e.g. MenuInventory) when parsing their config files
*/
View
@@ -33,11 +33,13 @@ const int VALIGN_CENTER = 0;
const int VALIGN_TOP = 1;
const int VALIGN_BOTTOM = 2;
-typedef struct LabelInfo {
+struct LabelInfo {
int x,y;
int justify,valign;
bool hidden;
-}LabelInfo;
+
+ LabelInfo();
+};
LabelInfo eatLabelInfo(std::string val);

0 comments on commit 3e46b9c

Please sign in to comment.