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

select: cleanup

parent 696ac1bb
Branches
Tags
No related merge requests found
...@@ -662,13 +662,12 @@ struct OPENDHT_PUBLIC Select ...@@ -662,13 +662,12 @@ struct OPENDHT_PUBLIC Select
* @return the set of fields. * @return the set of fields.
*/ */
std::set<Value::Field> getSelection() const { std::set<Value::Field> getSelection() const {
return std::set<Value::Field>(fieldSelection_.begin(), fieldSelection_.end()); return {fieldSelection_.begin(), fieldSelection_.end()};
} }
template <typename Packer> template <typename Packer>
void msgpack_pack(Packer& pk) const { pk.pack(fieldSelection_); } void msgpack_pack(Packer& pk) const { pk.pack(fieldSelection_); }
void msgpack_unpack(const msgpack::object& o) { void msgpack_unpack(const msgpack::object& o) {
fieldSelection_.clear();
fieldSelection_ = o.as<decltype(fieldSelection_)>(); fieldSelection_ = o.as<decltype(fieldSelection_)>();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment