mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-08 10:12:59 +01:00
32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
diff --git a/src/MessageTypeStore.cpp b/src/MessageTypeStore.cpp
|
|
index 44c94ec..3b66c06 100644
|
|
--- a/src/MessageTypeStore.cpp
|
|
+++ b/src/MessageTypeStore.cpp
|
|
@@ -114,7 +114,7 @@ MessagePtr Arcus::MessageTypeStore::createMessage(const std::string& type_name)
|
|
|
|
uint32_t Arcus::MessageTypeStore::getMessageTypeId(const MessagePtr& message)
|
|
{
|
|
- return hash(message->GetTypeName());
|
|
+ return hash(std::string(message->GetTypeName()));
|
|
}
|
|
|
|
std::string Arcus::MessageTypeStore::getErrorMessages() const
|
|
@@ -124,7 +124,7 @@ std::string Arcus::MessageTypeStore::getErrorMessages() const
|
|
|
|
bool Arcus::MessageTypeStore::registerMessageType(const google::protobuf::Message* message_type)
|
|
{
|
|
- uint32_t type_id = hash(message_type->GetTypeName());
|
|
+ uint32_t type_id = hash(std::string(message_type->GetTypeName()));
|
|
|
|
if (hasType(type_id))
|
|
{
|
|
@@ -185,7 +185,7 @@ bool Arcus::MessageTypeStore::registerAllMessageTypes(const std::string& file_na
|
|
{
|
|
auto message_type_descriptor = descriptor->message_type(i);
|
|
auto message_type = d->message_factory->GetPrototype(message_type_descriptor);
|
|
- uint32_t type_id = hash(message_type->GetTypeName());
|
|
+ uint32_t type_id = hash(std::string(message_type->GetTypeName()));
|
|
#ifdef ARCUS_DEBUG
|
|
std::cerr << message_type->GetTypeName() << ": " << type_id << std::endl;
|
|
#endif // ARCUS_DEBUG
|