diff --git a/src/bsp/Entity.cpp b/src/bsp/Entity.cpp index 732532f9..5f80c82c 100644 --- a/src/bsp/Entity.cpp +++ b/src/bsp/Entity.cpp @@ -9,7 +9,7 @@ Entity::Entity(const std::string& classname) addKeyvalue("classname", classname); } -void Entity::addKeyvalue(const std::string& key, const std::string& value, bool multisupport) +void Entity::addKeyvalue(const std::string key, const std::string value, bool multisupport) { int dup = 1; if (keyvalues.find(key) == keyvalues.end()) @@ -63,7 +63,7 @@ void Entity::setOrAddKeyvalue(const std::string& key, const std::string& value) addKeyvalue(key, value); } -void Entity::removeKeyvalue(const std::string& key) +void Entity::removeKeyvalue(const std::string key) { if (!hasKey(key)) return; @@ -117,7 +117,7 @@ void Entity::clearEmptyKeyvalues() targetsCached = false; } -bool Entity::hasKey(const std::string& key) +bool Entity::hasKey(const std::string key) { return keyvalues.find(key) != keyvalues.end() && std::find(keyOrder.begin(), keyOrder.end(), key) != keyOrder.end(); } diff --git a/src/bsp/Entity.h b/src/bsp/Entity.h index 91f11d11..040c6e45 100644 --- a/src/bsp/Entity.h +++ b/src/bsp/Entity.h @@ -18,8 +18,8 @@ class Entity Entity(const std::string& classname); ~Entity(void) = default; - void addKeyvalue(const std::string& key, const std::string& value, bool multisupport = false); - void removeKeyvalue(const std::string& key); + void addKeyvalue(const std::string key, const std::string value, bool multisupport = false); + void removeKeyvalue(const std::string key); bool renameKey(int idx, const std::string& newName); void clearAllKeyvalues(); void clearEmptyKeyvalues(); @@ -34,7 +34,7 @@ class Entity vec3 getOrigin(); - bool hasKey(const std::string& key); + bool hasKey(const std::string key); std::vector getTargets();