Skip to content

Commit

Permalink
make previously private resetTo() method public
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteemann committed Jun 27, 2023
1 parent 37e363b commit 7a399cc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions include/velocypack/Builder.h
Expand Up @@ -613,6 +613,19 @@ class Builder {
close();
return *this;
}

void resetTo(std::size_t value) {
_pos = value;
VELOCYPACK_ASSERT(_bufferPtr != nullptr);
_bufferPtr->resetTo(value);
}

// move byte position x bytes ahead
void advance(std::size_t value) noexcept {
_pos += value;
VELOCYPACK_ASSERT(_bufferPtr != nullptr);
_bufferPtr->advance(value);
}

private:
void closeLevel() noexcept;
Expand Down Expand Up @@ -1034,19 +1047,6 @@ class Builder {
_bufferPtr->advance();
}

inline void resetTo(std::size_t value) {
_pos = value;
VELOCYPACK_ASSERT(_bufferPtr != nullptr);
_bufferPtr->resetTo(value);
}

// move byte position x bytes ahead
inline void advance(std::size_t value) noexcept {
_pos += value;
VELOCYPACK_ASSERT(_bufferPtr != nullptr);
_bufferPtr->advance(value);
}

// move byte position x bytes back
inline void rollback(std::size_t value) noexcept {
_pos -= value;
Expand Down

0 comments on commit 7a399cc

Please sign in to comment.