diff --git a/common/entdata.cc b/common/entdata.cc index 881caccd..d647c5b2 100644 --- a/common/entdata.cc +++ b/common/entdata.cc @@ -47,7 +47,7 @@ std::string entdict_t::get(const std::string_view &key) const vec_t entdict_t::get_float(const std::string_view &key) const { - auto &s = get(key); + auto s = get(key); if (s.empty()) { return 0; @@ -63,7 +63,7 @@ vec_t entdict_t::get_float(const std::string_view &key) const int32_t entdict_t::get_int(const std::string_view &key) const { - auto &s = get(key); + auto s = get(key); if (s.empty()) { return 0; diff --git a/include/common/entdata.h b/include/common/entdata.h index 156b157f..fb512d63 100644 --- a/include/common/entdata.h +++ b/include/common/entdata.h @@ -55,11 +55,11 @@ public: bool has(const std::string_view &key) const; - inline keyvalues_t::const_iterator entdict_t::begin() const { return keyvalues.begin(); } - inline keyvalues_t::const_iterator entdict_t::end() const { return keyvalues.end(); } + inline keyvalues_t::const_iterator begin() const { return keyvalues.begin(); } + inline keyvalues_t::const_iterator end() const { return keyvalues.end(); } - inline keyvalues_t::iterator entdict_t::begin() { return keyvalues.begin(); } - inline keyvalues_t::iterator entdict_t::end() { return keyvalues.end(); } + inline keyvalues_t::iterator begin() { return keyvalues.begin(); } + inline keyvalues_t::iterator end() { return keyvalues.end(); } inline size_t size() { return keyvalues.size(); }