File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,11 +134,8 @@ class JSON_API Array
134134 return value;
135135 }
136136
137- void add (const Dynamic::Var& value)
137+ void add (const Dynamic::Var& value);
138138 // / Add the given value to the array
139- {
140- _values.push_back (value);
141- }
142139
143140 void stringify (std::ostream& out, unsigned int indent) const ;
144141 // / Prints the array to out. When indent is 0, the array
@@ -178,14 +175,9 @@ inline bool Array::isArray(unsigned int index) const
178175}
179176
180177
181- inline bool Array::isNull ( unsigned int index) const
178+ inline void Array::add ( const Dynamic::Var& value)
182179{
183- if ( index < _values.size () )
184- {
185- Dynamic::Var value = _values[index];
186- return value.isEmpty ();
187- }
188- return true ;
180+ _values.push_back (value);
189181}
190182
191183
Original file line number Diff line number Diff line change @@ -118,8 +118,7 @@ class JSON_API Object
118118 {
119119 T value = def;
120120 ValueMap::const_iterator it = _values.find (key);
121- if ( it != _values.end ()
122- && ! it->second .isEmpty () )
121+ if (it != _values.end () && ! it->second .isEmpty () )
123122 {
124123 try
125124 {
Original file line number Diff line number Diff line change @@ -102,6 +102,17 @@ Object::Ptr Array::getObject(unsigned int index) const
102102}
103103
104104
105+ bool Array::isNull (unsigned int index) const
106+ {
107+ if ( index < _values.size () )
108+ {
109+ Dynamic::Var value = _values[index];
110+ return value.isEmpty ();
111+ }
112+ return true ;
113+ }
114+
115+
105116bool Array::isObject (unsigned int index) const
106117{
107118 Var value = get (index);
You can’t perform that action at this time.
0 commit comments