From 9b1647e81c68768f58d690ac307f8d2ff9f5831f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 26 Mar 2015 11:21:42 -0400 Subject: [PATCH] value: add constructor with move sementics for data --- include/opendht/value.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/opendht/value.h b/include/opendht/value.h index 2661751a..df366252 100644 --- a/include/opendht/value.h +++ b/include/opendht/value.h @@ -226,6 +226,8 @@ struct Value : public Serializable /** Generic constructor */ Value(ValueType::Id t, const Blob& data, Id id = INVALID_ID) : 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) : id(id), type(t), data(d.getPacked()) {} Value(const ValueType& t, const Serializable& d, Id id = INVALID_ID) -- GitLab