diff options
Diffstat (limited to 'include/plist/Array.h')
-rw-r--r-- | include/plist/Array.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h index 34ddd6f..949fa4c 100644 --- a/include/plist/Array.h +++ b/include/plist/Array.h @@ -52,19 +52,18 @@ public : const_iterator End() const; const_iterator end() const; size_t size() const; - void Append(Node* node); - void Insert(Node* node, unsigned int pos); + void Append(const Node& node); + void Append(const Node* node); + void Insert(const Node& node, unsigned int pos); + void Insert(const Node* node, unsigned int pos); void Remove(Node* node); void Remove(unsigned int pos); - unsigned int GetNodeIndex(Node* node) const; - template <typename T> - T* at(unsigned int index) - { + unsigned int GetNodeIndex(const Node& node) const; + unsigned int GetNodeIndex(const Node* node) const; + template <typename T> T* at(unsigned int index) { return (T*)(_array.at(index)); } - template <typename T> - T* At(unsigned int index) - { + template <typename T> T* At(unsigned int index) { return (T*)(_array.at(index)); } |