-
Notifications
You must be signed in to change notification settings - Fork 182
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
[Process] Unit name handling #1925
Conversation
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
@@ -22,6 +22,8 @@ | |||
#include <ecal/ecal_process.h> | |||
#include <ecal/ecal_defs.h> | |||
|
|||
#include <ecal_utils/filesystem.h> | |||
|
|||
#include <gtest/gtest.h> |
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: 'gtest/gtest.h' file not found [clang-diagnostic-error]
#include <gtest/gtest.h>
^
} | ||
|
||
TEST(core_cpp_core, SetGetUnitName) | ||
TEST(core_cpp_core, GetUnitName) |
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: all parameters should be named in a function [readability-named-parameter]
TEST(core_cpp_core, GetUnitName) | |
TEST(core_cpp_core /*unused*/, GetUnitName /*unused*/) |
@@ -118,17 +93,9 @@ | |||
EXPECT_EQ(true, eCAL::IsInitialized()); | |||
|
|||
// if we call eCAL_Initialize with empty unit name, eCAL will use the process name as unit name | |||
std::string process_name = extractProcessName(eCAL::Process::GetProcessName()); | |||
std::string process_name = EcalUtils::Filesystem::BaseName(eCAL::Process::GetProcessName()); |
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 'process_name' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string process_name = EcalUtils::Filesystem::BaseName(eCAL::Process::GetProcessName()); | |
std::string const process_name = EcalUtils::Filesystem::BaseName(eCAL::Process::GetProcessName()); |
@@ -22,6 +22,8 @@ | |||
#include <ecal/ecal_defs.h> | |||
#include <ecal/ecal_os.h> | |||
|
|||
#include <ecal_utils/filesystem.h> |
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: 'ecal_utils/filesystem.h' file not found [clang-diagnostic-error]
#include <ecal_utils/filesystem.h>
^
} | ||
|
||
TEST(core_c_core, SetGetUnitName) | ||
TEST(core_c_core, GetUnitName) |
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: all parameters should be named in a function [readability-named-parameter]
TEST(core_c_core, GetUnitName) | |
TEST(core_c_core /*unused*/, GetUnitName /*unused*/) |
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.
Looks good!
Description
Removed SetUnitName from API in C++, C and Python.
Changed UnitName generation in globals to use EcalUtils function.