Skip to content
Snippets Groups Projects
Commit 9b1647e8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

value: add constructor with move sementics for data

parent 6399cb70
No related branches found
No related tags found
No related merge requests found
...@@ -226,6 +226,8 @@ struct Value : public Serializable ...@@ -226,6 +226,8 @@ struct Value : public Serializable
/** Generic constructor */ /** Generic constructor */
Value(ValueType::Id t, const Blob& data, Id id = INVALID_ID) Value(ValueType::Id t, const Blob& data, Id id = INVALID_ID)
: id(id), type(t), data(data) {} : id(id), type(t), data(data) {}
Value(ValueType::Id t, Blob&& data, Id id = INVALID_ID)
: id(id), type(t), data(std::move(data)) {}
Value(ValueType::Id t, const Serializable& d, Id id = INVALID_ID) Value(ValueType::Id t, const Serializable& d, Id id = INVALID_ID)
: id(id), type(t), data(d.getPacked()) {} : id(id), type(t), data(d.getPacked()) {}
Value(const ValueType& t, const Serializable& d, Id id = INVALID_ID) Value(const ValueType& t, const Serializable& d, Id id = INVALID_ID)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment