summaryrefslogtreecommitdiff
path: root/src/gui/setup_relations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-24 22:48:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-24 22:48:35 +0300
commitb474de4a54c9b1d4d863971e40b807588d554436 (patch)
tree761e71f86ea232d1688ee2838bd2294c59dea947 /src/gui/setup_relations.cpp
parenta316d537dce50f4b4e1e10f5c26a7851baddbd8b (diff)
downloadmanaverse-b474de4a54c9b1d4d863971e40b807588d554436.tar.gz
manaverse-b474de4a54c9b1d4d863971e40b807588d554436.tar.bz2
manaverse-b474de4a54c9b1d4d863971e40b807588d554436.tar.xz
manaverse-b474de4a54c9b1d4d863971e40b807588d554436.zip
replace defines to consts.
Diffstat (limited to 'src/gui/setup_relations.cpp')
-rw-r--r--src/gui/setup_relations.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index c0558f56f..635adebe2 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -40,16 +40,16 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
-#define COLUMNS_NR 2 // name plus listbox
-#define NAME_COLUMN 0
-#define RELATION_CHOICE_COLUMN 1
+static const int COLUMNS_NR = 2; // name plus listbox
+static const int NAME_COLUMN = 0;
+static const unsigned int RELATION_CHOICE_COLUMN = 1;
-#define ROW_HEIGHT 12
+static const unsigned int ROW_HEIGHT = 12;
// The following column widths really shouldn't be hardcoded
// but should scale with the size of the widget... except
// that, right now, the widget doesn't exactly scale either.
-#define NAME_COLUMN_WIDTH 230
-#define RELATION_CHOICE_COLUMN_WIDTH 80
+static const unsigned int NAME_COLUMN_WIDTH = 230;
+static const unsigned int RELATION_CHOICE_COLUMN_WIDTH = 80;
#define WIDGET_AT(row, column) (((row) * COLUMNS_NR) + column)
@@ -227,9 +227,9 @@ public:
}
};
-#define ACTION_DELETE "delete"
-#define ACTION_TABLE "table"
-#define ACTION_STRATEGY "strategy"
+static const std::string ACTION_DELETE = "delete";
+static const std::string ACTION_TABLE = "table";
+static const std::string ACTION_STRATEGY = "strategy";
Setup_Relations::Setup_Relations():
mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)),