diff --git a/apps/openmw-mp/Utils.cpp b/apps/openmw-mp/Utils.cpp index 6f6eb39a5..921e45599 100644 --- a/apps/openmw-mp/Utils.cpp +++ b/apps/openmw-mp/Utils.cpp @@ -27,7 +27,7 @@ const vector Utils::split(const string &str, int delimiter) return result; } -ESM::Cell Utils::getCellFromDescription(std::string cellDescription) +ESM::Cell Utils::getCellFromDescription(const std::string &cellDescription) { ESM::Cell cell; cell.blank(); @@ -60,7 +60,7 @@ const std::string Utils::getLastError() return lastErrorMessage; } -void Utils::throwError(const std::string errorMessage) +void Utils::throwError(const std::string &errorMessage) { #ifdef _WIN32 // Throwing exceptions makes them show up as "bad exception" on Windows with diff --git a/apps/openmw-mp/Utils.hpp b/apps/openmw-mp/Utils.hpp index b6aaedc75..6853ac46f 100644 --- a/apps/openmw-mp/Utils.hpp +++ b/apps/openmw-mp/Utils.hpp @@ -38,11 +38,11 @@ namespace Utils { const std::vector split(const std::string &str, int delimiter); - ESM::Cell getCellFromDescription(std::string cellDescription); + ESM::Cell getCellFromDescription(const std::string &cellDescription); const std::string getLastError(); - void throwError(std::string errorMessage); + void throwError(const std::string &errorMessage); template constexpr unsigned int hash(const char(&str)[N], size_t I = N)