Skip to content
Snippets Groups Projects
Commit d5e6ef00 authored by Simon Désaulniers's avatar Simon Désaulniers
Browse files

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

parent 08465a6c
Branches
No related tags found
No related merge requests found
...@@ -150,7 +150,7 @@ public: ...@@ -150,7 +150,7 @@ public:
*/ */
static constexpr const size_t MAX_NODE_ENTRY_COUNT {16}; 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)>; 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); 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 ...@@ -161,7 +161,7 @@ dht::indexation::Pht::Key createPhtKey(std::map<std::string, std::string> pht_ke
dht::indexation::Pht::Key pht_key; dht::indexation::Pht::Key pht_key;
for (auto f : pht_key_str_map) { for (auto f : pht_key_str_map) {
dht::Blob prefix {f.second.begin(), f.second.end()}; 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; return pht_key;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment