diff --git a/json/tree.cpp b/json/tree.cpp index 39568267..213512f4 100644 --- a/json/tree.cpp +++ b/json/tree.cpp @@ -534,6 +534,22 @@ json::tree::array::operator==(const json::tree::array &rhs) const } +//----------------------------------------------------------------------------- +bool +json::tree::array::operator== (const node &rhs) const +{ + return rhs == *this; +} + + +//----------------------------------------------------------------------------- +size_t +json::tree::array::size (void) const +{ + return m_values.size (); +} + + //----------------------------------------------------------------------------- json::tree::node& json::tree::array::operator[] (unsigned int idx) diff --git a/json/tree.hpp b/json/tree.hpp index 19a85cca..fdfce417 100644 --- a/json/tree.hpp +++ b/json/tree.hpp @@ -173,11 +173,9 @@ namespace json { namespace tree { virtual type_t type (void) const { return ARRAY; } virtual bool operator==(const array &rhs) const; - virtual bool operator==(const node &rhs) const - { return rhs == *this; } + virtual bool operator==(const node &rhs) const; - virtual size_t size (void) const - { return m_values.size (); } + virtual size_t size (void) const; virtual node& operator [](unsigned int idx); virtual const node& operator [](unsigned int idx) const;