In the interpretter, the id is no longer passed by vallue, but as a const reference instead.

In getMembersLocal(, a reference to a reference wrapper is used, because the id can change, bu all we need to do is change a pointer.No need to change the value
This commit is contained in:
florent.teppe 2022-10-15 17:13:50 +02:00
parent 09d461a8cd
commit 874ff88288
4 changed files with 48 additions and 42 deletions

View file

@ -79,17 +79,17 @@ namespace Interpreter
virtual std::string_view getCurrentCellName() const = 0;
virtual int getMemberShort(ESM::RefId id, std::string_view name, bool global) const = 0;
virtual int getMemberShort(const ESM::RefId& id, std::string_view name, bool global) const = 0;
virtual int getMemberLong(ESM::RefId id, std::string_view name, bool global) const = 0;
virtual int getMemberLong(const ESM::RefId& id, std::string_view name, bool global) const = 0;
virtual float getMemberFloat(ESM::RefId id, std::string_view name, bool global) const = 0;
virtual float getMemberFloat(const ESM::RefId& id, std::string_view name, bool global) const = 0;
virtual void setMemberShort(ESM::RefId id, std::string_view name, int value, bool global) = 0;
virtual void setMemberShort(const ESM::RefId& id, std::string_view name, int value, bool global) = 0;
virtual void setMemberLong(ESM::RefId id, std::string_view name, int value, bool global) = 0;
virtual void setMemberLong(const ESM::RefId& id, std::string_view name, int value, bool global) = 0;
virtual void setMemberFloat(ESM::RefId id, std::string_view name, float value, bool global) = 0;
virtual void setMemberFloat(const ESM::RefId& id, std::string_view name, float value, bool global) = 0;
};
}