diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index fc3a3b6de..d24ebbd37 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -434,12 +434,12 @@ void Cell::uninitializeDedicatedActors() dedicatedActors.clear(); } -LocalActor *Cell::getLocalActor(std::string actorIndex) +LocalActor *Cell::getLocalActor(const std::string &actorIndex) { return localActors.at(actorIndex); } -DedicatedActor *Cell::getDedicatedActor(std::string actorIndex) +DedicatedActor *Cell::getDedicatedActor(const std::string &actorIndex) { return dedicatedActors.at(actorIndex); } diff --git a/apps/openmw/mwmp/Cell.hpp b/apps/openmw/mwmp/Cell.hpp index 29608c3d7..95db511dc 100644 --- a/apps/openmw/mwmp/Cell.hpp +++ b/apps/openmw/mwmp/Cell.hpp @@ -36,8 +36,8 @@ namespace mwmp void uninitializeLocalActors(); void uninitializeDedicatedActors(); - virtual LocalActor *getLocalActor(std::string actorIndex); - virtual DedicatedActor *getDedicatedActor(std::string actorIndex); + virtual LocalActor *getLocalActor(const std::string &actorIndex); + virtual DedicatedActor *getDedicatedActor(const std::string &actorIndex); bool hasLocalAuthority(); void setAuthority(const RakNet::RakNetGUID& guid);