mirror of https://gitee.com/bigwinds/arangodb
updated vpack library
This commit is contained in:
parent
852edf2f83
commit
d8463ae70a
|
@ -102,8 +102,7 @@ class Buffer {
|
|||
inline ValueLength length() const { return _pos; }
|
||||
|
||||
std::string toString() const {
|
||||
std::string result(reinterpret_cast<char const*>(_buffer), _pos);
|
||||
return std::move(result);
|
||||
return std::string(reinterpret_cast<char const*>(_buffer), _pos);
|
||||
}
|
||||
|
||||
void clear() { reset(); }
|
||||
|
|
|
@ -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); }
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue