diff --git a/components/openmw-mp/Utils.hpp b/components/openmw-mp/Utils.hpp index b70e621e2..98850c1ae 100644 --- a/components/openmw-mp/Utils.hpp +++ b/components/openmw-mp/Utils.hpp @@ -37,6 +37,19 @@ namespace Utils return std::find(vectorChecked.begin(), vectorChecked.end(), value) != vectorChecked.end(); } + template + uint32_t getVectorSize(const std::vector &vectorChecked) + { + return static_cast(vectorChecked.size()); + } + + template + void resetVector(std::vector &vectorInput, uint32_t newSize) + { + vectorInput.clear(); + vectorInput.resize(newSize); + } + std::string replaceString(const std::string &source, const char *find, const char *replace); std::string toString(int num);