diff --git a/src/game_scoped_storage.h b/src/game_scoped_storage.h index 5552f0a2a4c..46673739d7e 100644 --- a/src/game_scoped_storage.h +++ b/src/game_scoped_storage.h @@ -614,7 +614,7 @@ inline bool Game_DataStorage_TPL::ShouldWarn(int first_id, int last_id) const { ASSERT_IS_GLOBAL_SCOPE(S, "ShouldWarn"); if constexpr (storage_mode == VarStorage::eStorageMode_Vector) { - return (first_id <= 0 || last_id > this->GetSizeWithLimit()) && (_warnings > 0); + return (first_id <= 0 || last_id > this->template GetSizeWithLimit()) && (_warnings > 0); } return (first_id <= 0 && _warnings > 0); } @@ -625,13 +625,13 @@ inline bool Game_DataStorage_TPL::scopedShouldWarn(int first_id, int last_id, in ASSERT_IS_VARIABLE_SCOPE(S, "scopedShouldWarn"); if constexpr (DynamicScope::IsFrameScope(S)) { - return first_id <= 0 || last_id > this->GetLimit(); + return first_id <= 0 || last_id > this->template GetLimit(); } else if constexpr (storage_mode == VarStorage::eStorageMode_Vector) { if constexpr (DynamicScope::IsMapScope(S)) { - return (map_id <= 0 || first_id <= 0 || last_id > this->GetLimit()) && (_warnings > 0); + return (map_id <= 0 || first_id <= 0 || last_id > this->template GetLimit()) && (_warnings > 0); } if constexpr (DynamicScope::IsMapEventScope(S)) { - return (map_id <= 0 || event_id <= 0 || first_id <= 0 || last_id > this->GetLimit()) && (_warnings > 0); + return (map_id <= 0 || event_id <= 0 || first_id <= 0 || last_id > this->template GetLimit()) && (_warnings > 0); } } else { if constexpr (DynamicScope::IsMapScope(S)) { @@ -652,7 +652,7 @@ void Game_DataStorage_TPL::PerformRangeOperation(const int first_id, const int l if constexpr (sizeof...(Args) == 0) { ASSERT_IS_GLOBAL_SCOPE(S, "PerformRangeOperation"); - auto& storage = this->GetStorageForEdit(); + auto& storage = this->template GetStorageForEdit(); for (int i = std::max(1, first_id); i <= last_id; ++i) { if constexpr (std::is_same::value) { bool v = storage.vector_ref()[i - 1]; @@ -665,7 +665,7 @@ void Game_DataStorage_TPL::PerformRangeOperation(const int first_id, const int l } } else if constexpr (DynamicScope::IsFrameScope(S)) { std::vector& vec = GetFrameStorageForEdit(args...); - int hardcapped_last_id = std::min(last_id, static_cast(GetLimit())); + int hardcapped_last_id = std::min(last_id, static_cast(this->template GetLimit())); for (int i = std::max(0, first_id); i < hardcapped_last_id; ++i) { if constexpr (std::is_same::value) { @@ -686,7 +686,7 @@ void Game_DataStorage_TPL::PerformRangeOperation(const int first_id, const int l } else { ASSERT_IS_VARIABLE_SCOPE(S, "PerformRangeOperation"); - auto& storage = this->GetScopedStorageForEdit(true, args...); + auto& storage = this->template GetScopedStorageForEdit(true, args...); for (int i = std::max(1, first_id); i <= last_id; ++i) { if constexpr (std::is_same::value) { bool v = storage.vector_ref()[i - 1]; @@ -771,7 +771,7 @@ SCOPED_IMPL inline V Game_DataStorage_TPL::Get(int id, Args... args) const { if (EP_UNLIKELY(ShouldWarn(id, id))) { WarnGet(id, 0, 0); } - const Data_t& storage = this->GetStorage(); + const Data_t& storage = this->template GetStorage(); if (!storage.containsKey(id)) return false; return storage[id]; @@ -827,7 +827,7 @@ inline auto Game_DataStorage_TPL::FormatRValue(V v, const char* operandType, Dat //special handling for string storage if constexpr (std::is_same::value) { auto str = static_cast(v); - if (str && str.length() > 8) + if (str.length() > 8) v = str.substr(0, 5) + "..."; }