mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 02:39:46 +00:00
RefId's mId can't be get as mutable from the outside
also removed useless operator= defintion
This commit is contained in:
parent
d6d2a37d03
commit
ee941f9b09
3 changed files with 4 additions and 6 deletions
|
@ -431,7 +431,6 @@ namespace MWWorld
|
|||
{
|
||||
ESM::RefId& refId = refIDs[value.mRefID];
|
||||
// We manually lower case IDs here for the time being to improve performance.
|
||||
Misc::StringUtils::lowerCaseInPlace(refId.getRefIdString());
|
||||
++mRefCount[std::move(refId)];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -12,16 +12,16 @@ namespace ESM
|
|||
void clear() { mId.clear(); }
|
||||
bool empty() const { return mId.empty(); }
|
||||
void swap(RefId& rhs) { mId.swap(rhs.mId); }
|
||||
bool operator==(const RefId& rhs) const { return mId == rhs.mId; }
|
||||
void operator=(const RefId& rhs) { mId = rhs.mId; }
|
||||
bool operator==(const RefId& rhs) const { return ciEqual(*this, rhs); }
|
||||
bool operator<(const RefId& rhs) const { return mId < rhs.mId; }
|
||||
bool operator>(const RefId& rhs) const { return mId > rhs.mId; }
|
||||
static bool ciEqual(const RefId& left, const RefId& right);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const RefId& dt);
|
||||
|
||||
static RefId stringRefId(const std::string_view& id); //The
|
||||
std::string& getRefIdString() { return mId; }
|
||||
//The 2 following functions are used to move back and forth between string and RefID. Used for hard coded RefIds that are as string in the code.
|
||||
//For serialization, and display. Using explicit conversions make it very clear where in the code we need to convert from string to RefId and Vice versa.
|
||||
static RefId stringRefId(const std::string_view& id);
|
||||
const std::string& getRefIdString() const { return mId; }
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ namespace EsmLoader
|
|||
T record;
|
||||
bool deleted = false;
|
||||
record.load(reader, deleted);
|
||||
Misc::StringUtils::lowerCaseInPlace(record.mId.getRefIdString());
|
||||
if (Misc::ResourceHelpers::isHiddenMarker(record.mId.getRefIdString()))
|
||||
return;
|
||||
records.emplace_back(deleted, std::move(record));
|
||||
|
|
Loading…
Reference in a new issue