Skip to content
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 type of id in callbacks for server / client from SServiceMethodId to SServiceId. #1915

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

KerstinKeller
Copy link
Contributor

When registering events to see if a Server / Client has connected, the correct datatype to signal this is SServiceId.

@KerstinKeller KerstinKeller added the cherry-pick-to-NONE Don't cherry-pick these changes label Jan 17, 2025
Copy link
Contributor

@Peguen Peguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@github-actions github-actions bot left a 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

@@ -94,7 +94,7 @@ namespace eCAL
Logging::Log(Logging::log_level_debug1, "v5::CServiceClientImpl: Creating service client with name: " + service_name_);

// Define the event callback to pass to CServiceClient
v6::ClientEventCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const v6::SClientEventCallbackData& data_)
v6::ClientEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SClientEventCallbackData& data_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'event_callback' of type 'v6::ClientEventCallbackT' (aka 'function<void (const Registration::SServiceId &, const SClientEventCallbackData &)>') can be declared 'const' [misc-const-correctness]

Suggested change
v6::ClientEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SClientEventCallbackData& data_)
v6::ClientEventCallbackT const event_callback = [this](const Registration::SServiceId& service_id_, const v6::SClientEventCallbackData& data_)

@@ -57,7 +57,7 @@ namespace eCAL
}

// Define the event callback to pass to CServiceClient
v6::ServerEventCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const v6::SServerEventCallbackData& data_)
v6::ServerEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SServerEventCallbackData& data_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'event_callback' of type 'v6::ServerEventCallbackT' (aka 'function<void (const Registration::SServiceId &, const struct SServerEventCallbackData &)>') can be declared 'const' [misc-const-correctness]

Suggested change
v6::ServerEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SServerEventCallbackData& data_)
v6::ServerEventCallbackT const event_callback = [this](const Registration::SServiceId& service_id_, const v6::SServerEventCallbackData& data_)

@KerstinKeller KerstinKeller merged commit 4bbe51c into master Jan 17, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants