1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 12:39:41 +00:00

Merge branch 'silent_warning' into 'master'

Silent coverity warning

See merge request OpenMW/openmw!3423
This commit is contained in:
psi29a 2023-09-15 12:57:08 +00:00
commit 551f424c80
3 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@ namespace MWWorld
{
}
const ESM::RefNum& CellRef::getRefNum() const
const ESM::RefNum& CellRef::getRefNum() const noexcept
{
return std::visit(ESM::VisitOverload{
[&](const ESM4::Reference& ref) -> const ESM::RefNum& { return ref.mId; },

View file

@ -27,7 +27,7 @@ namespace MWWorld
explicit CellRef(const ESM4::ActorCharacter& ref);
// Note: Currently unused for items in containers
const ESM::RefNum& getRefNum() const;
const ESM::RefNum& getRefNum() const noexcept;
// Returns RefNum.
// If RefNum is not set, assigns a generated one and changes the "lastAssignedRefNum" counter.

View file

@ -49,7 +49,7 @@ namespace MWWorld
if (!refNum.isSet())
return;
auto it = mIndex.find(refNum);
if (it != mIndex.end() && it->second.getBase() == &ref)
if (it != mIndex.end() && it->second.mRef == &ref)
{
mIndex.erase(it);
++mRevision;