diff options
author | Rubidium <rubidium@openttd.org> | 2021-12-05 16:15:27 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-05 21:41:43 +0100 |
commit | ad89601c49bc5f4e996d2afea58db17fb1b01324 (patch) | |
tree | 1eb1e0f580fdfe8707625f46c4fca1e71ad329e0 /src/industry_gui.cpp | |
parent | ea4f6bb8b2a4e1298d1166febaaeebb3c9e583ed (diff) | |
download | openttd-ad89601c49bc5f4e996d2afea58db17fb1b01324.tar.xz |
Codechange: do not use all upper case enumerators in a scoped enum
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 1b63191f3..bfdb308b6 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1324,10 +1324,10 @@ protected: static CargoID produced_cargo_filter; enum class SorterType : uint8 { - IDW_SORT_BY_NAME, ///< Sorter type to sort by name - IDW_SORT_BY_TYPE, ///< Sorter type to sort by type - IDW_SORT_BY_PRODUCTION, ///< Sorter type to sort by production amount - IDW_SORT_BY_TRANSPORTED, ///< Sorter type to sort by transported percentage + ByName, ///< Sorter type to sort by name + ByType, ///< Sorter type to sort by type + ByProduction, ///< Sorter type to sort by production amount + ByTransported, ///< Sorter type to sort by transported percentage }; /** @@ -1552,9 +1552,9 @@ protected: } switch (static_cast<IndustryDirectoryWindow::SorterType>(this->industries.SortType())) { - case IndustryDirectoryWindow::SorterType::IDW_SORT_BY_NAME: - case IndustryDirectoryWindow::SorterType::IDW_SORT_BY_TYPE: - case IndustryDirectoryWindow::SorterType::IDW_SORT_BY_PRODUCTION: + case IndustryDirectoryWindow::SorterType::ByName: + case IndustryDirectoryWindow::SorterType::ByType: + case IndustryDirectoryWindow::SorterType::ByProduction: /* Sort by descending production, then descending transported */ std::sort(cargos.begin(), cargos.end(), [](const CargoInfo &a, const CargoInfo &b) { if (a.production != b.production) return a.production > b.production; @@ -1562,7 +1562,7 @@ protected: }); break; - case IndustryDirectoryWindow::SorterType::IDW_SORT_BY_TRANSPORTED: + case IndustryDirectoryWindow::SorterType::ByTransported: /* Sort by descending transported, then descending production */ std::sort(cargos.begin(), cargos.end(), [](const CargoInfo &a, const CargoInfo &b) { if (a.transported != b.transported) return a.transported > b.transported; |