diff --git a/include/opendht/indexation/pht.h b/include/opendht/indexation/pht.h index c2b2e5c29a4db16e0d7db4b2ef8ae65ad25014a6..05ca637f3e32de2b00739471b6eb67b6b973bfa0 100644 --- a/include/opendht/indexation/pht.h +++ b/include/opendht/indexation/pht.h @@ -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); diff --git a/tools/tools_common.h b/tools/tools_common.h index bd0d19741d21338e9921dfb616af5b9dc5f3e699..9682b0690a091e10911ad257280438f3a2ade31a 100644 --- a/tools/tools_common.h +++ b/tools/tools_common.h @@ -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; }