Preserve old DataPack behavior when overwriting data (#848)

* Match old DataPack behavior when overwriting data

* Make RemoveItem more flexible

* Ditch implied RemoveItem behavior & asher fixes

* KyleS nits - but fixed before he says them

* Add back implicit behavior

* Update CDataPack.cpp

Committing to the spec.

* Update CDataPack.h

* fixup removing last item if explicitly requested

* Fix logic for accepting pack pos, rather than index

* Fixup IsReadable

* headache is over now
This commit is contained in:
Michael Flaherty
2018-07-14 17:00:17 -07:00
committed by Kyle Sanderson
parent e4862dade8
commit 32d12ea4a6
4 changed files with 56 additions and 6 deletions
+1
View File
@@ -76,6 +76,7 @@ public:
void Initialize();
inline size_t GetCapacity() const { return this->elements.length(); };
inline CDataPackType GetCurrentType(void) const { return this->elements[this->position].type; };
bool RemoveItem(size_t pos = -1);
private:
typedef union {