diff --git a/neo/idlib/containers/List.h b/neo/idlib/containers/List.h index 7ae0afe4..9b2f0013 100644 --- a/neo/idlib/containers/List.h +++ b/neo/idlib/containers/List.h @@ -203,11 +203,11 @@ public: memTag = ( byte )tag_; }; - /* + template struct Iterator { - _type_* p; - _type_& operator*() + T* p; + T& operator*() { return *p; } @@ -223,14 +223,15 @@ public: auto begin() const // const version { - return Iterator{list}; + return Iterator<_type_>{list}; }; auto end() const // const version { - return Iterator{list + Num()}; + return Iterator<_type_>{list + Num( )}; }; - */ + + /* // Begin/End methods for range-based for loops. _type_* begin() { @@ -277,7 +278,7 @@ public: return nullptr; } } - + */ private: int num; int size; diff --git a/neo/idlib/gltfParser.h b/neo/idlib/gltfParser.h index 654443f6..95b955ca 100644 --- a/neo/idlib/gltfParser.h +++ b/neo/idlib/gltfParser.h @@ -54,7 +54,6 @@ public: } virtual ~parseType() { - delete item; } T* item; };