Skip to content

Commit

Permalink
Refs #21095: Linter
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Jun 11, 2024
1 parent 4965f91 commit d5ceeab
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/cpp/discovery_server/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,15 @@ class CLIParser
else if (arg == "-t" || arg == "--topic")
{
if (config.entity == CLIParser::EntityKind::CLIENT_PUBLISHER ||
config.entity == CLIParser::EntityKind::CLIENT_SUBSCRIBER)
config.entity == CLIParser::EntityKind::CLIENT_SUBSCRIBER)
{
config.pub_config.topic_name = argv[i];
config.sub_config.topic_name = argv[i];
}
else
{
EPROSIMA_LOG_ERROR(CLI_PARSER, "wrong or missing entity for --topic argument: only available for publisher and subscriber");
EPROSIMA_LOG_ERROR(CLI_PARSER,
"wrong or missing entity for --topic argument: only available for publisher and subscriber");
print_help(EXIT_FAILURE);
}
}
Expand Down Expand Up @@ -561,7 +562,7 @@ class CLIParser
input > std::numeric_limits<uint16_t>::max())
{
throw std::out_of_range("listening-port argument " + std::string(
argv[i]) + " out of range [0, 65535].");
argv[i]) + " out of range [0, 65535].");
}
else
{
Expand Down Expand Up @@ -604,7 +605,7 @@ class CLIParser
if (input < 0 || input > 255)
{
throw std::out_of_range("id argument " + std::string(
argv[i]) + " out of range [0, 255].");
argv[i]) + " out of range [0, 255].");
}
else
{
Expand Down Expand Up @@ -648,7 +649,7 @@ class CLIParser
input > std::numeric_limits<uint16_t>::max())
{
throw std::out_of_range("timeout argument " + std::string(
argv[i]) + " out of range [0, 65535].");
argv[i]) + " out of range [0, 65535].");
}
else
{
Expand Down Expand Up @@ -687,8 +688,8 @@ class CLIParser
}

if (uses_ipv6
&& !listening_address_was_set
&& config.entity == CLIParser::EntityKind::SERVER)
&& !listening_address_was_set
&& config.entity == CLIParser::EntityKind::SERVER)
{
config.srv_config.listening_address = "::1";
}
Expand Down

0 comments on commit d5ceeab

Please sign in to comment.