From 45bed001ee8b56953f4e59f719302d8f2a5d424f Mon Sep 17 00:00:00 2001 From: miloyip Date: Sun, 3 May 2015 23:44:58 +0800 Subject: [PATCH] Remove unusable StringRef overloads --- include/rapidjson/pointer.h | 60 ------------------------------------- 1 file changed, 60 deletions(-) diff --git a/include/rapidjson/pointer.h b/include/rapidjson/pointer.h index 7ba5174..635601d 100644 --- a/include/rapidjson/pointer.h +++ b/include/rapidjson/pointer.h @@ -231,11 +231,6 @@ public: return v; } - ValueType& GetWithDefault(ValueType& root, GenericStringRef 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); @@ -270,11 +265,6 @@ public: return GetWithDefault(root, defaultValue, root.GetAllocator()); } - template - ValueType& GetWithDefault(GenericDocument& root, GenericStringRef defaultValue) const { - return GetWithDefault(root, defaultValue, root.GetAllocator()); - } - template ValueType& GetWithDefault(GenericDocument& 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 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; @@ -337,11 +322,6 @@ public: return Create(root).CopyFrom(value, root.GetAllocator()); } - template - ValueType& Set(GenericDocument& root, GenericStringRef value) const { - return Create(root) = value; - } - template ValueType& Set(GenericDocument& root, const Ch* value) const { return Create(root) = ValueType(value, root.GetAllocator()).Move(); @@ -666,11 +646,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe return pointer.GetWithDefault(root, defaultValue, a); } -template -typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, GenericStringRef defaultValue, typename T::AllocatorType& a) { - return pointer.GetWithDefault(root, defaultValue, a); -} - template typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) { return pointer.GetWithDefault(root, defaultValue, a); @@ -694,11 +669,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); } -template -typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], GenericStringRef defaultValue, typename T::AllocatorType& a) { - return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); -} - template typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) { return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); @@ -724,11 +694,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe return pointer.GetWithDefault(root, defaultValue); } -template -typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, GenericStringRef defaultValue) { - return pointer.GetWithDefault(root, defaultValue); -} - template typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, const typename T::Ch* defaultValue) { return pointer.GetWithDefault(root, defaultValue); @@ -752,11 +717,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue); } -template -typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], GenericStringRef defaultValue) { - return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue); -} - template typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue) { return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue); @@ -782,11 +742,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer -typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, GenericStringRef value, typename T::AllocatorType& a) { - return pointer.Set(root, value, a); -} - template typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, const typename T::Ch* value, typename T::AllocatorType& a) { return pointer.Set(root, value, a); @@ -810,11 +765,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty return GenericPointer(source, N - 1).Set(root, value, a); } -template -typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], GenericStringRef value, typename T::AllocatorType& a) { - return GenericPointer(source, N - 1).Set(root, value, a); -} - template typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) { return GenericPointer(source, N - 1).Set(root, value, a); @@ -840,11 +790,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer -typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, GenericStringRef value) { - return pointer.Set(root, value); -} - template typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, const typename T::Ch* value) { return pointer.Set(root, value); @@ -868,11 +813,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty return GenericPointer(source, N - 1).Set(root, value); } -template -typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], GenericStringRef value) { - return GenericPointer(source, N - 1).Set(root, value); -} - template typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value) { return GenericPointer(source, N - 1).Set(root, value);