Explorar o código

Make JSONParser::size const

Daniele Bartolini %!s(int64=12) %!d(string=hai) anos
pai
achega
7ba759879e
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      engine/core/json/JSONParser.cpp
  2. 1 1
      engine/core/json/JSONParser.h

+ 1 - 1
engine/core/json/JSONParser.cpp

@@ -308,7 +308,7 @@ bool JSONParser::is_object() const
 }
 
 //--------------------------------------------------------------------------
-uint32_t JSONParser::size()
+uint32_t JSONParser::size() const
 {
 	switch(JSONParser::type(m_at))
 	{

+ 1 - 1
engine/core/json/JSONParser.h

@@ -96,7 +96,7 @@ public:
 	/// * string: length of the string
 	/// * array: number of elements in the array
 	/// * object: number of keys in the object
-	uint32_t			size();
+	uint32_t			size() const;
 
 	/// Returns the boolean value of the current element.
 	bool				bool_value() const;