diff options
author | miloyip <miloyip@gmail.com> | 2015-05-03 18:44:58 +0300 |
---|---|---|
committer | miloyip <miloyip@gmail.com> | 2015-05-03 18:44:58 +0300 |
commit | 45bed001ee8b56953f4e59f719302d8f2a5d424f (patch) | |
tree | e8b59a6d26ca0e563e8a496a9fc94cf7124797e3 /include/rapidjson/pointer.h | |
parent | 524974deec46f437a2e46f490be556c802635774 (diff) |
Remove unusable StringRef overloads
Diffstat (limited to 'include/rapidjson/pointer.h')
-rw-r--r-- | include/rapidjson/pointer.h | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/include/rapidjson/pointer.h b/include/rapidjson/pointer.h index 7ba51743..635601df 100644 --- a/include/rapidjson/pointer.h +++ b/include/rapidjson/pointer.h @@ -231,11 +231,6 @@ public: return v; } - ValueType& GetWithDefault(ValueType& root, GenericStringRef<Ch> defaultValue, typename ValueType::AllocatorType& allocator) const { - ValueType v(defaultValue); - return GetWithDefault(root, v, allocator); - } - ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const { bool alreadyExist; Value& v = Create(root, allocator, &alreadyExist); @@ -271,11 +266,6 @@ public: } template <typename stackAllocator> - ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& root, GenericStringRef<Ch> defaultValue) const { - return GetWithDefault(root, defaultValue, root.GetAllocator()); - } - - template <typename stackAllocator> ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& root, const Ch* defaultValue) const { return GetWithDefault(root, defaultValue, root.GetAllocator()); } @@ -303,11 +293,6 @@ public: return Create(root, allocator).CopyFrom(value, allocator); } - ValueType& Set(ValueType& root, GenericStringRef<Ch> value, typename ValueType::AllocatorType& allocator) const { - ValueType v(value); - return Create(root, allocator) = v; - } - ValueType& Set(ValueType& root, const Ch* value, typename ValueType::AllocatorType& allocator) const { ValueType v(value, allocator); return Create(root, allocator) = v; @@ -338,11 +323,6 @@ public: } template <typename stackAllocator> - ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& root, GenericStringRef<Ch> value) const { - return Create(root) = value; - } - - template <typename stackAllocator> ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& root, const Ch* value) const { return Create(root) = ValueType(value, root.GetAllocator()).Move(); } @@ -667,11 +647,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe } template <typename T> -typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, GenericStringRef<typename T::Ch> defaultValue, typename T::AllocatorType& a) { - return pointer.GetWithDefault(root, defaultValue, a); -} - -template <typename T> typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) { return pointer.GetWithDefault(root, defaultValue, a); } @@ -695,11 +670,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou } template <typename T, typename CharType, size_t N> -typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], GenericStringRef<typename T::Ch> defaultValue, typename T::AllocatorType& a) { - return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a); -} - -template <typename T, typename CharType, size_t N> typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) { return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a); } @@ -725,11 +695,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe } template <typename T> -typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, GenericStringRef<typename T::Ch> defaultValue) { - return pointer.GetWithDefault(root, defaultValue); -} - -template <typename T> typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* defaultValue) { return pointer.GetWithDefault(root, defaultValue); } @@ -753,11 +718,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou } template <typename T, typename CharType, size_t N> -typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], GenericStringRef<typename T::Ch> defaultValue) { - return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue); -} - -template <typename T, typename CharType, size_t N> typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue) { return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue); } @@ -783,11 +743,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename } template <typename T> -typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, GenericStringRef<typename T::Ch> value, typename T::AllocatorType& a) { - return pointer.Set(root, value, a); -} - -template <typename T> typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* value, typename T::AllocatorType& a) { return pointer.Set(root, value, a); } @@ -811,11 +766,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty } template <typename T, typename CharType, size_t N> -typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], GenericStringRef<typename T::Ch> value, typename T::AllocatorType& a) { - return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a); -} - -template <typename T, typename CharType, size_t N> typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) { return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a); } @@ -841,11 +791,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename } template <typename T> -typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, GenericStringRef<typename T::Ch> value) { - return pointer.Set(root, value); -} - -template <typename T> typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* value) { return pointer.Set(root, value); } @@ -869,11 +814,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty } template <typename T, typename CharType, size_t N> -typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], GenericStringRef<typename T::Ch> value) { - return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value); -} - -template <typename T, typename CharType, size_t N> typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value) { return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value); } |