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] Aligned return types of ecal_core.h and ecal_logging.h #1867

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

hannemn
Copy link
Contributor

@hannemn hannemn commented Dec 17, 2024

Refers to issue #1832.

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

@@ -103,16 +103,16 @@ const char* ecal_getdate()
int ecal_initialize(const char* unit_name_)
{
std::string unit_name = (unit_name_ != nullptr) ? std::string(unit_name_) : std::string("");
return(eCAL::Initialize(unit_name));
return static_cast<int>(!eCAL::Initialize(unit_name));
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 'unit_name' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]

Suggested change
return static_cast<int>(!eCAL::Initialize(unit_name));
std::string const unit_name = (unit_name_ != nullptr) ? std::string(unit_name_) : std::string("");

@hannemn hannemn added the cherry-pick-to-NONE Don't cherry-pick these changes label Dec 18, 2024
@hannemn hannemn enabled auto-merge (squash) December 18, 2024 18:01
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.

🚀

@hannemn hannemn merged commit 00f8ef0 into master Dec 19, 2024
21 of 22 checks passed
@Peguen Peguen deleted the feature/align-return-types branch December 19, 2024 08:16
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.

2 participants