diff --git a/3rdParty/velocypack/include/velocypack/Buffer.h b/3rdParty/velocypack/include/velocypack/Buffer.h index 83b90a7fd7..25fc8843d9 100644 --- a/3rdParty/velocypack/include/velocypack/Buffer.h +++ b/3rdParty/velocypack/include/velocypack/Buffer.h @@ -102,8 +102,7 @@ class Buffer { inline ValueLength length() const { return _pos; } std::string toString() const { - std::string result(reinterpret_cast(_buffer), _pos); - return std::move(result); + return std::string(reinterpret_cast(_buffer), _pos); } void clear() { reset(); } diff --git a/3rdParty/velocypack/include/velocypack/Dumper.h b/3rdParty/velocypack/include/velocypack/Dumper.h index 9aef04a822..9473a9a996 100644 --- a/3rdParty/velocypack/include/velocypack/Dumper.h +++ b/3rdParty/velocypack/include/velocypack/Dumper.h @@ -89,7 +89,7 @@ class Dumper { static std::string toString(Slice const* slice, Options const* options = &Options::Defaults) { - return std::move(toString(*slice, options)); + return toString(*slice, options); } void append(Slice const& slice) { dumpValue(&slice); } diff --git a/3rdParty/velocypack/src/Builder.cpp b/3rdParty/velocypack/src/Builder.cpp index 2a791e20a5..877f27ec37 100644 --- a/3rdParty/velocypack/src/Builder.cpp +++ b/3rdParty/velocypack/src/Builder.cpp @@ -34,9 +34,12 @@ using namespace arangodb::velocypack; std::string Builder::toString() const { + Options options; + options.prettyPrint = true; + std::string buffer; StringSink sink(&buffer); - Dumper::dump(slice(), &sink, options); + Dumper::dump(slice(), &sink, &options); return std::move(buffer); } diff --git a/3rdParty/velocypack/src/Slice.cpp b/3rdParty/velocypack/src/Slice.cpp index 91a7ee460e..f13c34a5ef 100644 --- a/3rdParty/velocypack/src/Slice.cpp +++ b/3rdParty/velocypack/src/Slice.cpp @@ -273,7 +273,7 @@ std::string Slice::toString() const { return std::move(buffer); } -std::string Slice::hexType() const { return std::move(HexDump::toHex(head())); } +std::string Slice::hexType() const { return HexDump::toHex(head()); } // look for the specified attribute inside an Object // returns a Slice(ValueType::None) if not found