Deprecate Frame::GetElement(ID*), replace with GetElementByID()

This commit is contained in:
Jon Siwek 2020-05-23 09:06:37 -07:00
parent 1ccbe743d0
commit 9f4eca081f
3 changed files with 13 additions and 6 deletions

View file

@ -74,7 +74,12 @@ public:
* @param id the id who's value to retreive
* @return the value associated with *id*
*/
Val* GetElement(const ID* id) const;
const IntrusivePtr<Val>& GetElementByID(const IntrusivePtr<ID>& id) const
{ return GetElementByID(id.get()); }
[[deprecated("Remove in v4.1. Use GetElementByID().")]]
Val* GetElement(const ID* id) const
{ return GetElementByID(id).get(); }
/**
* Resets all of the indexes from [*startIdx, frame_size) in
@ -232,6 +237,8 @@ private:
using OffsetMap = std::unordered_map<std::string, int>;
const IntrusivePtr<Val>& GetElementByID(const ID* id) const;
/**
* Sets the element at index *n* of the underlying array to *v*, but does
* not take ownership of a reference count to it. This method is used to