-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Change entity_id type from std::string to uint64_t #1872
base: master
Are you sure you want to change the base?
Conversation
… unique within the system)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -23,9 +23,10 @@ | |||
**/ | |||
|
|||
#pragma once | |||
#include <cstdint> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'cstdint' file not found [clang-diagnostic-error]
#include <cstdint>
^
if (arg == nullptr) return false; | ||
if (*arg == nullptr) return false; | ||
|
||
size_t len = stream->bytes_left; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'len' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness]
size_t len = stream->bytes_left; | |
size_t const len = stream->bytes_left; |
@@ -37,7 +37,7 @@ namespace eCAL | |||
std::string host_name; | |||
int32_t process_id = 0; | |||
std::string topic_name; | |||
std::string topic_id; | |||
uint64_t topic_id = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use here uint64_t while we have down below in AddSubscription/RemSubscription the Registration::EntityIdT ?
Functional change: change map IDs from combined strings to entity_id only (as they are unique within the system)
The serialization format is kept as is for binary compatibility. E.g. while internally being handled as uint64_t, it is converted to a string on the wire, and parsed from the string upon deserialization.
Please review with regard to the following:
Name of EntityID type:
using EntityIdT = uint64_t;
or ratherTEntityID
(similar toSEntityID
-> bit unhappy about naming here)