diff options
author | rubidium <rubidium@openttd.org> | 2008-12-23 21:03:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-23 21:03:43 +0000 |
commit | c3746a55bbee5d1b752411480a6e1abfe0413870 (patch) | |
tree | 13bdd9c673e98449442640715abe78de2b568a5e /src/graph_gui.cpp | |
parent | ece37ca2c095ff672cd9f6e793da865c9029c83c (diff) | |
download | openttd-c3746a55bbee5d1b752411480a6e1abfe0413870.tar.xz |
(svn r14732) -Codechange: replace some magic number with less magic constants and use the proper type for a few variables.
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r-- | src/graph_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 199248cd4..1f9bcf973 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -66,7 +66,7 @@ struct GraphLegendWindow : Window { virtual void OnClick(Point pt, int widget) { - if (!IsInsideMM(widget, 3, 11)) return; + if (!IsInsideMM(widget, 3, MAX_COMPANIES + 3)) return; ToggleBit(_legend_excluded_companies, widget - 3); this->ToggleWidgetLoweredState(widget); @@ -859,7 +859,7 @@ struct PerformanceRatingDetailWindow : Window { private: enum PerformanteRatingWidgets { PRW_COMPANY_FIRST = 13, - PRW_COMPANY_LAST = 20, + PRW_COMPANY_LAST = PRW_COMPANY_FIRST + MAX_COMPANIES - 1, }; public: |