From 5e47c27550efca4c318cfe4b9bdfe51a28bc2984 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 9 May 2015 09:24:19 +0000 Subject: (svn r27277) -Codechange: Make _displayed_industries a std::bitset. --- src/smallmap_gui.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/smallmap_gui.cpp') diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index ef0f4dd0f..80d4ae2a8 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -28,6 +28,8 @@ #include "table/strings.h" +#include + #include "safeguards.h" static int _smallmap_industry_count; ///< Number of used industries @@ -175,7 +177,7 @@ void BuildIndustriesLegend() uint j = 0; /* Add each name */ - for (uint8 i = 0; i < NUM_INDUSTRYTYPES; i++) { + for (uint i = 0; i < NUM_INDUSTRYTYPES; i++) { IndustryType ind = _sorted_industry_types[i]; const IndustrySpec *indsp = GetIndustrySpec(ind); if (indsp->enabled) { @@ -1507,11 +1509,11 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) break; case 0: { - extern uint64 _displayed_industries; + extern std::bitset _displayed_industries; if (this->map_type != SMT_INDUSTRY) this->SwitchMapType(SMT_INDUSTRY); for (int i = 0; i != _smallmap_industry_count; i++) { - _legend_from_industries[i].show_on_map = HasBit(_displayed_industries, _legend_from_industries[i].type); + _legend_from_industries[i].show_on_map = _displayed_industries.test(_legend_from_industries[i].type); } break; } -- cgit v1.2.3-54-g00ecf