From 398418b8fa23ab59f5fc027a7dd6aeba9da4d7bb Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 13 May 2010 09:44:44 +0000 Subject: (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int --- src/graph_gui.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/graph_gui.cpp') diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 44cfe2f16..f07b52754 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -175,14 +175,12 @@ enum CompanyValueWidgets { struct BaseGraphWindow : Window { protected: - enum { - GRAPH_MAX_DATASETS = 32, - GRAPH_AXIS_LINE_COLOUR = 215, - GRAPH_NUM_MONTHS = 24, ///< Number of months displayed in the graph. + static const int GRAPH_MAX_DATASETS = 32; + static const int GRAPH_AXIS_LINE_COLOUR = 215; + static const int GRAPH_NUM_MONTHS = 24; ///< Number of months displayed in the graph. - MIN_GRAPH_NUM_LINES_Y = 9, ///< Minimal number of horizontal lines to draw. - MIN_GRID_PIXEL_SIZE = 20, ///< Minimum distance between graph lines. - }; + static const int MIN_GRAPH_NUM_LINES_Y = 9; ///< Minimal number of horizontal lines to draw. + static const int MIN_GRID_PIXEL_SIZE = 20; ///< Minimum distance between graph lines. uint excluded_data; ///< bitmask of the datasets that shouldn't be displayed. byte num_dataset; -- cgit v1.2.3-54-g00ecf