From b474de4a54c9b1d4d863971e40b807588d554436 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 24 Aug 2012 22:48:35 +0300 Subject: replace defines to consts. --- src/gui/setup_relations.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/setup_relations.cpp') 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)), -- cgit v1.2.3-60-g2f50