diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp index 6d4e36f5a3..35c40978ab 100644 --- a/src/core/enum_type.hpp +++ b/src/core/enum_type.hpp @@ -246,16 +246,12 @@ public: template class EnumClassIndexContainer : public Container { public: - Container::reference at(size_t pos) { return this->Container::at(pos); } Container::reference at(const Index &pos) { return this->Container::at(to_underlying(pos)); } - Container::const_reference at(size_t pos) const { return this->Container::at(pos); } Container::const_reference at(const Index &pos) const { return this->Container::at(to_underlying(pos)); } - Container::reference operator[](size_t pos) { return this->Container::operator[](pos); } Container::reference operator[](const Index &pos) { return this->Container::operator[](to_underlying(pos)); } - Container::const_reference operator[](size_t pos) const { return this->Container::operator[](pos); } Container::const_reference operator[](const Index &pos) const { return this->Container::operator[](to_underlying(pos)); } }; diff --git a/src/newgrf/newgrf_act0_globalvar.cpp b/src/newgrf/newgrf_act0_globalvar.cpp index 7d32a1a794..2d80f27b18 100644 --- a/src/newgrf/newgrf_act0_globalvar.cpp +++ b/src/newgrf/newgrf_act0_globalvar.cpp @@ -138,7 +138,7 @@ static ChangeInfoResult GlobalVarChangeInfo(uint first, uint last, int prop, Byt int factor = buf.ReadByte(); if (id < to_underlying(Price::End)) { - _cur_gps.grffile->price_base_multipliers[id] = std::min(factor - 8, MAX_PRICE_MODIFIER); + _cur_gps.grffile->price_base_multipliers[static_cast(id)] = std::min(factor - 8, MAX_PRICE_MODIFIER); } else { GrfMsg(1, "GlobalVarChangeInfo: Price {} out of range, ignoring", id); }