Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Apr 29, 2024
1 parent be6cf11 commit 5d14fc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ecal/core/src/readwrite/shm/ecal_writer_shm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace eCAL
{
const std::string CDataWriterSHM::m_memfile_base_name = "ecal_";

CDataWriterSHM::CDataWriterSHM(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const CPublisher::SHMConfig& shm_config_) :
CDataWriterSHM::CDataWriterSHM(const std::string& /*host_name_*/, const std::string& topic_name_, const std::string& /*topic_id_*/, const CPublisher::SHMConfig& shm_config_) :
m_config(shm_config_)
{
m_topic_name = topic_name_;
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace eCAL
}

// prepare memfile attributes
SSyncMemoryFileAttr memory_file_attr;
SSyncMemoryFileAttr memory_file_attr = {};
memory_file_attr.min_size = m_config.memfile_min_size_bytes;
memory_file_attr.reserve = m_config.memfile_reserve_percent;
memory_file_attr.timeout_open_ms = PUB_MEMFILE_OPEN_TO;
Expand Down
10 changes: 5 additions & 5 deletions ecal/tests/cpp/pubsub_test/src/pubsub_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ TEST(core_cpp_pubsub, DynamicCreate)
TEST(core_cpp_pubsub, ZeroPayloadMessageSHM)
{
// default send string
std::string send_s;
const std::string send_s;

// initialize eCAL API
eCAL::Initialize(0, nullptr, "pubsub_test");
Expand Down Expand Up @@ -649,7 +649,7 @@ TEST(core_cpp_pubsub, MultipleSendsSHM)
// let's match them
eCAL::Process::SleepMS(2 * CMN_REGISTRATION_REFRESH);
long long timestamp = 1;
for (const auto elem : send_vector)
for (const auto& elem : send_vector)
{
pub.Send(elem, timestamp);
eCAL::Process::SleepMS(DATA_FLOW_TIME);
Expand All @@ -671,9 +671,9 @@ TEST(core_cpp_pubsub, MultipleSendsSHM)
TEST(core_cpp_pubsub, MultipleSendsUDP)
{
// default send string
std::vector<std::string> send_vector{ "this", "is", "a", "", "testtest" };
const std::vector<std::string> send_vector{ "this", "is", "a", "", "testtest" };
std::string last_received_msg;
long long last_received_timestamp;
long long last_received_timestamp(0);

// initialize eCAL API
eCAL::Initialize(0, nullptr, "pubsub_test");
Expand Down Expand Up @@ -705,7 +705,7 @@ TEST(core_cpp_pubsub, MultipleSendsUDP)
// let's match them
eCAL::Process::SleepMS(2 * CMN_REGISTRATION_REFRESH);
long long timestamp = 1;
for (const auto elem : send_vector)
for (const auto& elem : send_vector)
{
pub.Send(elem, timestamp);
eCAL::Process::SleepMS(DATA_FLOW_TIME);
Expand Down

0 comments on commit 5d14fc7

Please sign in to comment.