[init] Use a real std::unordered_map for the services map
Now that ceil* works in libc, use std::unordered_map instead of util::node_map to store the protocol to service mapping.
This commit is contained in:
@@ -21,7 +21,7 @@ void
|
|||||||
service_locator_start(j6_handle_t mb)
|
service_locator_start(j6_handle_t mb)
|
||||||
{
|
{
|
||||||
// TODO: This should be a multimap
|
// TODO: This should be a multimap
|
||||||
util::node_map<uint64_t, handle_entry> services;
|
std::unordered_map<uint64_t, j6_handle_t> services;
|
||||||
|
|
||||||
uint64_t tag = 0;
|
uint64_t tag = 0;
|
||||||
uint64_t subtag = 0;
|
uint64_t subtag = 0;
|
||||||
@@ -64,11 +64,13 @@ service_locator_start(j6_handle_t mb)
|
|||||||
proto_id = subtag;
|
proto_id = subtag;
|
||||||
tag = j6_proto_sl_result;
|
tag = j6_proto_sl_result;
|
||||||
|
|
||||||
found = services.find(proto_id);
|
{
|
||||||
if (found)
|
auto found = services.find(proto_id);
|
||||||
give_handle = found->handle;
|
if (found != services.end())
|
||||||
else
|
give_handle = found->second;
|
||||||
give_handle = j6_handle_invalid;
|
else
|
||||||
|
give_handle = j6_handle_invalid;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user