Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "ItemDef.hpp"
|
||||
#include "../util/stringutil.hpp"
|
||||
|
||||
ItemDef::ItemDef(std::string name) : name(name) {
|
||||
ItemDef::ItemDef(const std::string& name) : name(name) {
|
||||
caption = util::id_to_caption(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user