Pass a string by reference

openmw-38
scrawl 9 years ago
parent f35ab12979
commit 1212c07266

@ -11,7 +11,7 @@
#include "class.hpp"
#include "esmstore.hpp"
MWWorld::LiveCellRefBase::LiveCellRefBase(std::string type, const ESM::CellRef &cref)
MWWorld::LiveCellRefBase::LiveCellRefBase(const std::string& type, const ESM::CellRef &cref)
: mClass(&Class::get(type)), mRef(cref), mData(cref)
{
}

@ -31,7 +31,7 @@ namespace MWWorld
/** runtime-data */
RefData mData;
LiveCellRefBase(std::string type, const ESM::CellRef &cref=ESM::CellRef());
LiveCellRefBase(const std::string& type, const ESM::CellRef &cref=ESM::CellRef());
/* Need this for the class to be recognized as polymorphic */
virtual ~LiveCellRefBase() { }

Loading…
Cancel
Save