Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2018-02-12 05:16:27 +0300
committerMilo Yip <miloyip@gmail.com>2018-02-12 05:16:27 +0300
commit672e7dd3732417971e41c0a3d0161e43d1b37db3 (patch)
tree57253c86cabd5355f9f67e0999a5e1f1ecca6889 /include/rapidjson/pointer.h
parentdaabb88e001f562e1f7df5f44d7fed32a0c107c2 (diff)
Fix invalid type in Pointer
Fixed https://github.com/miloyip/rapidjson-gitbook/issues/1
Diffstat (limited to 'include/rapidjson/pointer.h')
-rw-r--r--include/rapidjson/pointer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rapidjson/pointer.h b/include/rapidjson/pointer.h
index 217e71ce..8bcb85ed 100644
--- a/include/rapidjson/pointer.h
+++ b/include/rapidjson/pointer.h
@@ -537,14 +537,14 @@ public:
*/
ValueType& GetWithDefault(ValueType& root, const ValueType& defaultValue, typename ValueType::AllocatorType& allocator) const {
bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
+ ValueType& v = Create(root, allocator, &alreadyExist);
return alreadyExist ? v : v.CopyFrom(defaultValue, allocator);
}
//! Query a value in a subtree with default null-terminated string.
ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const {
bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
+ ValueType& v = Create(root, allocator, &alreadyExist);
return alreadyExist ? v : v.SetString(defaultValue, allocator);
}
@@ -552,7 +552,7 @@ public:
//! Query a value in a subtree with default std::basic_string.
ValueType& GetWithDefault(ValueType& root, const std::basic_string<Ch>& defaultValue, typename ValueType::AllocatorType& allocator) const {
bool alreadyExist;
- Value& v = Create(root, allocator, &alreadyExist);
+ ValueType& v = Create(root, allocator, &alreadyExist);
return alreadyExist ? v : v.SetString(defaultValue, allocator);
}
#endif