Skip to content

Commit 1a85cbf

Browse files
committed
format and clang tidy
Signed-off-by: Santiago Figueroa Manrique <figueroa1395@gmail.com>
1 parent b3c8f52 commit 1a85cbf

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/dataset.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ class DatasetWritable {
134134
class DatasetMutable {
135135
public:
136136
explicit DatasetMutable(std::string const& dataset, bool is_batch, Idx batch_size)
137-
: dataset_{
138-
handle_.call_with(PGM_create_dataset_mutable, dataset.c_str(), (is_batch ? Idx{1} : Idx{0}), batch_size)},
137+
: dataset_{handle_.call_with(PGM_create_dataset_mutable, dataset.c_str(), (is_batch ? Idx{1} : Idx{0}),
138+
batch_size)},
139139
info_{handle_.call_with(PGM_dataset_mutable_get_info, get())} {}
140140

141141
RawMutableDataset const* get() const { return dataset_.get(); }
@@ -173,8 +173,8 @@ class DatasetMutable {
173173
class DatasetConst {
174174
public:
175175
explicit DatasetConst(std::string const& dataset, bool is_batch, Idx batch_size)
176-
: dataset_{
177-
handle_.call_with(PGM_create_dataset_const, dataset.c_str(), (is_batch ? Idx{1} : Idx{0}), batch_size)},
176+
: dataset_{handle_.call_with(PGM_create_dataset_const, dataset.c_str(), (is_batch ? Idx{1} : Idx{0}),
177+
batch_size)},
178178
info_{handle_.call_with(PGM_dataset_const_get_info, get())} {}
179179

180180
DatasetConst(DatasetWritable const& writable_dataset)
@@ -290,7 +290,6 @@ inline std::set<std::string, std::less<>> get_irrelevant_components(PGM_Calculat
290290
}
291291
return {};
292292
}
293-
294293
struct OwningDataset {
295294
DatasetMutable dataset;
296295
OwningMemory storage{};

tests/native_api_tests/test_api_dataset.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
namespace power_grid_model_cpp {
2121
namespace {
22+
using namespace std::string_literals;
2223
using power_grid_model_cpp_test::load_dataset;
2324
constexpr auto const json_data = R"({
2425
"version": "1.0",
@@ -53,8 +54,6 @@ constexpr auto const json_data = R"({
5354
})"; // NOLINT(misc-include-cleaner) https://github.com/llvm/llvm-project/issues/98122
5455
} // namespace
5556
TEST_CASE("Test get_output_type") {
56-
using namespace std::string_literals;
57-
5857
SUBCASE("Power flow") {
5958
CHECK(get_output_type(PGM_power_flow, true) == "sym_output"s);
6059
CHECK(get_output_type(PGM_power_flow, false) == "asym_output"s);
@@ -70,8 +69,6 @@ TEST_CASE("Test get_output_type") {
7069
}
7170

7271
TEST_CASE("Test get_irrelevant_components") {
73-
using namespace std::string_literals;
74-
7572
SUBCASE("Power flow") {
7673
auto const component_list = std::set<std::string, std::less<>>{"sym_voltage_sensor"s,
7774
"sym_current_sensor"s,
@@ -98,7 +95,6 @@ TEST_CASE("Test get_irrelevant_components") {
9895
}
9996

10097
TEST_CASE("OwningDataset - filter irrelevant components") {
101-
using namespace std::string_literals;
10298
auto const input_dataset = load_dataset(json_data);
10399
auto options = Options{};
104100
Model model{50.0, input_dataset.dataset};
@@ -143,5 +139,4 @@ TEST_CASE("OwningDataset - filter irrelevant components") {
143139
info, {"sym_power_sensor", "sym_voltage_sensor", "asym_current_sensor", "voltage_regulator"});
144140
}
145141
}
146-
147142
} // namespace power_grid_model_cpp

0 commit comments

Comments
 (0)