1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:53:53 +00:00

Pass a string by reference

This commit is contained in:
scrawl 2015-12-18 17:08:26 +01:00
parent f35ab12979
commit 1212c07266
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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() { }