Skip to content

Commit

Permalink
mini cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteemann committed Dec 8, 2021
1 parent f270313 commit 6ec285c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion include/velocypack/Buffer.h
Expand Up @@ -243,7 +243,7 @@ class Buffer {
_size += len;
}

void append(std::string_view const& value) {
void append(std::string_view value) {
return append(value.data(), value.size());
}

Expand Down
26 changes: 2 additions & 24 deletions include/velocypack/Slice.h
Expand Up @@ -580,19 +580,6 @@ class Slice {
return last;
}

// look for the specified attribute path inside an Object
// returns a Slice(ValueType::None) if not found
/*
template<typename T>
typename std::enable_if<
std::is_base_of<std::forward_iterator_tag, typename std::iterator_traits<typename T::iterator>::iterator_category>::value,
Slice>::type get(T const& attributes,
bool resolveExternals = false) const {
// forward to the iterator-based lookup
return this->get(attributes.begin(), attributes.end(), resolveExternals);
}
*/

// look for the specified attribute path inside an Object
// returns a Slice(ValueType::None) if not found
template<typename T>
Expand All @@ -615,7 +602,7 @@ class Slice {
// returns a Slice(ValueType::None) if not found
Slice get(std::string_view attribute) const;

Slice get(HashedStringRef const& attribute) const {
[[deprecated]] Slice get(HashedStringRef attribute) const {
return get(std::string_view(attribute.data(), attribute.size()));
}

Expand All @@ -627,15 +614,6 @@ class Slice {
return get(attribute);
}

// whether or not an Object has a specific sub-key
/*
template<typename T>
typename std::enable_if<
std::is_base_of<std::forward_iterator_tag, typename std::iterator_traits<typename T::iterator>::iterator_category>::value,
bool>::type hasKey(T const& attributes) const {
return !this->get(attributes.begin(), attributes.end()).isNone();
}
*/
// whether or not an Object has a specific key
template<typename T>
bool hasKey(std::vector<T> const& attributes) const {
Expand All @@ -654,7 +632,7 @@ class Slice {
}

// whether or not an Object has a specific key
bool hasKey(HashedStringRef const& attribute) const {
bool hasKey(HashedStringRef attribute) const {
return hasKey(std::string_view(attribute.data(), attribute.size()));
}

Expand Down

0 comments on commit 6ec285c

Please sign in to comment.