refactor: change string_view to string in LocalChannelBackend subscription index map (#124)
Updated the SubscribeIndexMap in LocalChannelBackend to use std::string instead of std::string_view for msg_type, topic, lib_path, and module_name. This change enhances memory management and ensures proper ownership semantics for string data within the subscription index map.
This commit is contained in:
parent
2e96cbe0f7
commit
86be305db8
@ -67,13 +67,13 @@ class LocalChannelBackend : public ChannelBackendBase {
|
||||
|
||||
using SubscribeIndexMap =
|
||||
std::unordered_map<
|
||||
std::string_view, // msg_type
|
||||
std::string, // msg_type
|
||||
std::unordered_map<
|
||||
std::string_view, // topic
|
||||
std::string, // topic
|
||||
std::unordered_map<
|
||||
std::string_view, // lib_path
|
||||
std::string, // lib_path
|
||||
std::unordered_set<
|
||||
std::string_view>>>>; // module_name
|
||||
std::string>>>>; // module_name
|
||||
SubscribeIndexMap subscribe_index_map_;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user