Skip to content

Commit 6f635ce

Browse files
committed
Fix uncrustify
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
1 parent 7e240f6 commit 6f635ce

2 files changed

Lines changed: 35 additions & 32 deletions

File tree

ddsrouter_yaml/src/cpp/YamlReaderConfiguration.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ YamlReaderConfiguration::load_ddsrouter_configuration(
6363
default:
6464

6565
throw eprosima::utils::ConfigurationException(
66-
utils::Formatter() <<
67-
"The yaml configuration version " << version <<
68-
" is no longer supported. Please update to v5.0.");
66+
utils::Formatter()
67+
<< "The yaml configuration version " << version
68+
<< " is no longer supported. Please update to v5.0.");
6969
break;
7070

7171
case ddspipe::yaml::YamlReaderVersion::V_4_0:
7272
EPROSIMA_LOG_WARNING(DDSROUTER_YAML,
73-
"The yaml configuration version " << version <<
74-
" is deprecated and will be removed in a future release. Please update to v5.0.");
73+
"The yaml configuration version "
74+
<< version
75+
<< " is deprecated and will be removed in a future release. Please update to v5.0.");
7576
break;
7677
}
7778
}
@@ -80,9 +81,11 @@ YamlReaderConfiguration::load_ddsrouter_configuration(
8081
// Get default version
8182
version = default_yaml_version();
8283
EPROSIMA_LOG_WARNING(DDSROUTER_YAML,
83-
"No version of yaml configuration given. Using version " << version << " by default. " <<
84-
"Add " << ddspipe::yaml::VERSION_TAG << " tag to your configuration in order to not break compatibility " <<
85-
"in future releases.");
84+
"No version of yaml configuration given. Using version "
85+
<< version << " by default. "
86+
<< "Add " << ddspipe::yaml::VERSION_TAG
87+
<< " tag to your configuration in order to not break compatibility "
88+
<< "in future releases.");
8689
}
8790

8891
EPROSIMA_LOG_INFO(DDSROUTER_YAML, "Loading DDSRouter configuration with version: " << version << ".");
@@ -122,15 +125,15 @@ YamlReaderConfiguration::load_ddsrouter_configuration_from_file(
122125
catch (const std::exception& e)
123126
{
124127
throw eprosima::utils::ConfigurationException(
125-
utils::Formatter() << "Error loading DDSRouter configuration from file: <" << file_path <<
126-
"> :\n " << e.what());
128+
utils::Formatter() << "Error loading DDSRouter configuration from file: <" << file_path
129+
<< "> :\n " << e.what());
127130
}
128131

129132
if (yml.IsNull())
130133
{
131134
throw eprosima::utils::ConfigurationException(
132-
utils::Formatter() << "Error loading DDSRouter configuration from file: <" << file_path <<
133-
"> :\n " << "yaml node is null.");
135+
utils::Formatter() << "Error loading DDSRouter configuration from file: <" << file_path
136+
<< "> :\n " << "yaml node is null.");
134137
}
135138

136139
return YamlReaderConfiguration::load_ddsrouter_configuration(yml, args);

ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,30 @@ std::string schema_path = "./ddsrouter_config_schema.json";
3131

3232
// Vectors with the valid and invalid YAML files
3333
std::vector<std::string> valid_files = []()
34-
{
35-
std::vector<std::string> files;
36-
for (const auto& entry : std::filesystem::directory_iterator("./valid_config_files_router/"))
37-
{
38-
if (entry.path().extension() == ".yaml")
3934
{
40-
files.push_back(entry.path().generic_string());
41-
}
42-
}
43-
return files;
44-
}();
35+
std::vector<std::string> files;
36+
for (const auto& entry : std::filesystem::directory_iterator("./valid_config_files_router/"))
37+
{
38+
if (entry.path().extension() == ".yaml")
39+
{
40+
files.push_back(entry.path().generic_string());
41+
}
42+
}
43+
return files;
44+
}();
4545

4646
std::vector<std::string> invalid_files = []()
47-
{
48-
std::vector<std::string> files;
49-
for (const auto& entry : std::filesystem::directory_iterator("./invalid_config_files_router/"))
50-
{
51-
if (entry.path().extension() == ".yaml")
5247
{
53-
files.push_back(entry.path().generic_string());
54-
}
55-
}
56-
return files;
57-
}();
48+
std::vector<std::string> files;
49+
for (const auto& entry : std::filesystem::directory_iterator("./invalid_config_files_router/"))
50+
{
51+
if (entry.path().extension() == ".yaml")
52+
{
53+
files.push_back(entry.path().generic_string());
54+
}
55+
}
56+
return files;
57+
}();
5858
} // namespace test
5959

6060
/**

0 commit comments

Comments
 (0)