diff options
author | stormcone <48624099+stormcone@users.noreply.github.com> | 2020-09-25 16:35:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 15:35:48 +0100 |
commit | 49b75d67bd3b13016d06f884bb66c14063d3f722 (patch) | |
tree | 8fe088a49296eaf232be8632c4566c1bba8d4f92 /src | |
parent | 348c231e12d87c106bd1ab3c9d7a5ecdab6863d8 (diff) | |
download | openttd-49b75d67bd3b13016d06f884bb66c14063d3f722.tar.xz |
Fix 70f9c3c6: The *_filter_criteria variables contain an index, not a cargo. (#8320)
Diffstat (limited to 'src')
-rw-r--r-- | src/industry_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 87fa97d3b..a795b6a0e 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1254,14 +1254,14 @@ protected: CargoID cargo_filter[NUM_CARGO + 2]; ///< Available cargo filters; CargoID or CF_ANY or CF_NONE StringID cargo_filter_texts[NUM_CARGO + 3]; ///< Texts for filter_cargo, terminated by INVALID_STRING_ID - CargoID produced_cargo_filter_criteria; ///< Selected produced cargo filter - CargoID accepted_cargo_filter_criteria; ///< Selected accepted cargo filter + byte produced_cargo_filter_criteria; ///< Selected produced cargo filter index + byte accepted_cargo_filter_criteria; ///< Selected accepted cargo filter index /** * Set cargo filter list item index. * @param index The index of the cargo to be set */ - void SetProducedCargoFilterIndex(int index) + void SetProducedCargoFilterIndex(byte index) { if (this->produced_cargo_filter_criteria != index) { this->produced_cargo_filter_criteria = index; @@ -1278,7 +1278,7 @@ protected: * Set cargo filter list item index. * @param index The index of the cargo to be set */ - void SetAcceptedCargoFilterIndex(int index) + void SetAcceptedCargoFilterIndex(byte index) { if (this->accepted_cargo_filter_criteria != index) { this->accepted_cargo_filter_criteria = index; @@ -1296,7 +1296,7 @@ protected: */ void SetCargoFilterArray() { - uint filter_items = 0; + byte filter_items = 0; /* Add item for disabling filtering. */ this->cargo_filter[filter_items] = CF_ANY; |