From 56568fd73f28fe19ece89daae3883d214d888b5d Mon Sep 17 00:00:00 2001 From: miloyip Date: Mon, 4 May 2015 10:25:31 +0800 Subject: [PATCH] Add GenericValue::ValueType and fix warning for SetString(std::string, Allocator) --- include/rapidjson/document.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index a649768..7386773 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -427,6 +427,7 @@ public: typedef typename GenericMemberIterator::Iterator ConstMemberIterator; //!< Constant member iterator for iterating in object. typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array. typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array. + typedef GenericValue ValueType; //!< Value type of itself. //!@name Constructors and destructor. //@{ @@ -1417,7 +1418,7 @@ public: \post IsString() == true && GetString() != s.data() && strcmp(GetString(),s.data() == 0 && GetStringLength() == s.size() \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. */ - GenericValue& SetString(const std::basic_string& s, Allocator& allocator) { return SetString(s.data(), s.size(), allocator); } + GenericValue& SetString(const std::basic_string& s, Allocator& allocator) { return SetString(s.data(), SizeType(s.size()), allocator); } #endif //@}