1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Silent coverity warning

This commit is contained in:
Petr Mikheev 2023-09-12 11:34:22 +02:00
parent 42b77342c5
commit 4fa8756791
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;