Skip to content
Snippets Groups Projects
Commit 736606a8 authored by Simon Désaulniers's avatar Simon Désaulniers Committed by Adrien Béraud
Browse files

pht: a Key is rather map str:Blob not str:Prefix

parent cba240e1
Branches
Tags
No related merge requests found
......@@ -150,7 +150,7 @@ public:
*/
static constexpr const size_t MAX_NODE_ENTRY_COUNT {16};
using Key = std::map<std::string, Prefix>;
using Key = std::map<std::string, Blob>;
using LookupCallback = std::function<void(std::vector<std::shared_ptr<Value>>& values, Prefix p)>;
typedef void (*LookupCallbackRaw)(std::vector<std::shared_ptr<Value>>* values, Prefix* p, void *user_data);
......
......@@ -161,7 +161,7 @@ dht::indexation::Pht::Key createPhtKey(std::map<std::string, std::string> pht_ke
dht::indexation::Pht::Key pht_key;
for (auto f : pht_key_str_map) {
dht::Blob prefix {f.second.begin(), f.second.end()};
pht_key.emplace(f.first, prefix);
pht_key.emplace(f.first, std::move(prefix));
}
return pht_key;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment