Skip to content

Commit

Permalink
Refs #20823: Uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
  • Loading branch information
elianalf committed May 31, 2024
1 parent 9607a27 commit 29d638f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
48 changes: 32 additions & 16 deletions examples/cpp/content_filter/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,36 @@ class CLIParser
static void print_help(
uint8_t return_code)
{
std::cout << "Usage: content_filter <entity> [options]" << std::endl;
std::cout << "" << std::endl;
std::cout << "Entities:" << std::endl;
std::cout << " publisher Run a publisher entity" << std::endl;
std::cout << " subscriber Run a subscriber entity" << std::endl;
std::cout << "" << std::endl;
std::cout << "Common options:" << std::endl;
std::cout << " -h, --help Print this help message" << std::endl;
std::cout << "Publisher options:" << std::endl;
std::cout << " -s <num>, --samples <num> Number of samples to send" << std::endl;
std::cout << " (Default: 0 [unlimited])" << std::endl;
std::cout << " -i <num>, --interval <num> Time between samples in milliseconds"<< std::endl;
std::cout << "Subscriber options:" << std::endl;
std::cout << " -f <default/custom>, --filter <default/custom> Kind of Content Filter to use" << std::endl;
std::cout << " (Default: DDS SQL default filter)" << std::endl;
std::cout << "Usage: content_filter <entity> [options]" <<
std::endl;
std::cout << "" <<
std::endl;
std::cout << "Entities:" <<
std::endl;
std::cout << " publisher Run a publisher entity" <<
std::endl;
std::cout << " subscriber Run a subscriber entity" <<
std::endl;
std::cout << "" <<
std::endl;
std::cout << "Common options:" <<
std::endl;
std::cout << " -h, --help Print this help message" <<
std::endl;
std::cout << "Publisher options:" <<
std::endl;
std::cout << " -s <num>, --samples <num> Number of samples to send" <<
std::endl;
std::cout << " (Default: 0 [unlimited])" <<
std::endl;
std::cout << " -i <num>, --interval <num> Time between samples in milliseconds" <<
std::endl;
std::cout << "Subscriber options:" <<
std::endl;
std::cout << " -f <default/custom>, --filter <default/custom> Kind of Content Filter to use" <<
std::endl;
std::cout << " (Default: DDS SQL default filter)" <<
std::endl;
std::exit(return_code);
}

Expand Down Expand Up @@ -160,7 +175,8 @@ class CLIParser
}
else if (config.entity == CLIParser::EntityKind::SUBSCRIBER)
{
EPROSIMA_LOG_ERROR(CLI_PARSER, "samples option option can only be used with the Publisher");
EPROSIMA_LOG_ERROR(CLI_PARSER,
"samples option option can only be used with the Publisher");
print_help(EXIT_FAILURE);
}
else
Expand Down
13 changes: 5 additions & 8 deletions examples/cpp/content_filter/HelloWorld.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class HelloWorld
eProsima_user_DllExport HelloWorld(
const HelloWorld& x)
{
m_index = x.m_index;
m_index = x.m_index;

m_message = x.m_message;
m_message = x.m_message;

}

Expand All @@ -105,9 +105,9 @@ class HelloWorld
const HelloWorld& x)
{

m_index = x.m_index;
m_index = x.m_index;

m_message = x.m_message;
m_message = x.m_message;

return *this;
}
Expand All @@ -133,7 +133,7 @@ class HelloWorld
const HelloWorld& x) const
{
return (m_index == x.m_index &&
m_message == x.m_message);
m_message == x.m_message);
}

/*!
Expand Down Expand Up @@ -174,7 +174,6 @@ class HelloWorld
return m_index;
}


/*!
* @brief This function copies the value in member message
* @param _message New value to be copied in member message
Expand Down Expand Up @@ -213,8 +212,6 @@ class HelloWorld
return m_message;
}



private:

uint32_t m_index{0};
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp/content_filter/HelloWorldPubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType
}

eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
{
static_cast<void>(data_representation);
return false;
Expand Down

0 comments on commit 29d638f

Please sign in to comment.