Commit 45bed001 authored by miloyip's avatar miloyip

Remove unusable StringRef overloads

parent 524974de
......@@ -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);
......@@ -270,11 +265,6 @@ public:
return GetWithDefault(root, defaultValue, root.GetAllocator());
}
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;
......@@ -337,11 +322,6 @@ public:
return Create(root).CopyFrom(value, root.GetAllocator());
}
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();
......@@ -666,11 +646,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe
return pointer.GetWithDefault(root, defaultValue, a);
}
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);
......@@ -694,11 +669,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou
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], 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);
......@@ -724,11 +694,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointe
return pointer.GetWithDefault(root, defaultValue);
}
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);
......@@ -752,11 +717,6 @@ typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&sou
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], 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);
......@@ -782,11 +742,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename
return pointer.Set(root, value, a);
}
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);
......@@ -810,11 +765,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty
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], 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);
......@@ -840,11 +790,6 @@ typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename
return pointer.Set(root, value);
}
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);
......@@ -868,11 +813,6 @@ typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], ty
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], 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment