1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:53:50 +00:00

[Client] Do not copy strings in getLocalActor and getDedicatedActor

This commit is contained in:
Koncord 2018-01-19 15:50:44 +08:00
parent e2e197d84a
commit c2578918f2
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}

View file

@ -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);