Skip to content

Commit 5092b50

Browse files
committed
fix formatting again
- now with the correct clang-format version Signed-off-by: Eduard Fried <eduard.fried@soptim.de>
1 parent 7385230 commit 5092b50

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

power_grid_model_c/power_grid_model/include/power_grid_model/main_core/calculation_input_preparation.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ inline auto calculate_param(auto const& c, auto const&... extra_args)
8484
* The default lambda `include_all` always returns `true`.
8585
*/
8686
template <calculation_input_type CalcStructOut, typename CalcParamOut,
87-
std::vector<CalcParamOut>(CalcStructOut::* comp_vect), class ComponentIn,
87+
std::vector<CalcParamOut>(CalcStructOut::*comp_vect), class ComponentIn,
8888
std::invocable<Idx> PredicateIn = IncludeAll>
8989
requires std::convertible_to<std::invoke_result_t<PredicateIn, Idx>, bool>
9090
void prepare_input(main_model_state_c auto const& state, std::vector<Idx2D> const& components,
@@ -103,7 +103,7 @@ void prepare_input(main_model_state_c auto const& state, std::vector<Idx2D> cons
103103
}
104104

105105
template <calculation_input_type CalcStructOut, typename CalcParamOut,
106-
std::vector<CalcParamOut>(CalcStructOut::* comp_vect), class ComponentIn,
106+
std::vector<CalcParamOut>(CalcStructOut::*comp_vect), class ComponentIn,
107107
std::invocable<Idx> PredicateIn = IncludeAll>
108108
requires std::convertible_to<std::invoke_result_t<PredicateIn, Idx>, bool>
109109
void prepare_input(main_model_state_c auto const& state, std::vector<Idx2D> const& components,
@@ -122,7 +122,7 @@ void prepare_input(main_model_state_c auto const& state, std::vector<Idx2D> cons
122122
}
123123
}
124124

125-
template <symmetry_tag sym, class InputType, IntSVector(InputType::* component), class Component>
125+
template <symmetry_tag sym, class InputType, IntSVector(InputType::*component), class Component>
126126
requires std::same_as<InputType, PowerFlowInput<sym>> || std::same_as<InputType, StateEstimationInput<sym>>
127127
void prepare_input_status(main_model_state_c auto const& state, std::vector<Idx2D> const& objects,
128128
std::vector<InputType>& input) {

power_grid_model_c/power_grid_model/include/power_grid_model/main_core/core_utils.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ template <typename Tuple, class Functor, std::size_t... Indices>
2424
constexpr auto run_functor_with_tuple_index_return_array(Functor&& functor,
2525
std::index_sequence<Indices...> /*unused*/) {
2626
if constexpr (sizeof...(Indices) == 1) {
27-
return std::array{
28-
std::forward<Functor>(functor).template operator()<std::tuple_element_t<Indices, Tuple>>()...};
27+
return std::array {
28+
std::forward<Functor>(functor).template operator()<std::tuple_element_t<Indices, Tuple>>()...
29+
};
2930
} else {
30-
auto result = std::array{functor.template operator()<std::tuple_element_t<Indices, Tuple>>()...};
31+
auto result = std::array { functor.template operator()<std::tuple_element_t<Indices, Tuple>>()... };
3132
capturing::into_the_void(std::forward<Functor>(functor));
3233
return result;
3334
}

power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/base_optimizer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ concept optimizer_c =
6565
{
6666
optimizer.optimize(state, method)
6767
} -> std::same_as<
68-
MathOutput<detail::state_calculator_result_t<typename Optimizer::Calculator, typename Optimizer::State>>>;
68+
MathOutput<detail::state_calculator_result_t<typename Optimizer::Calculator, typename Optimizer::State>>>;
6969
};
7070

7171
template <typename StateCalculator, typename State_>

power_grid_model_c/power_grid_model_c/src/handle.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ struct PGM_Handle {
2828
};
2929

3030
template <class Exception = std::exception, class Functor>
31-
inline auto call_with_catch(PGM_Handle* handle, Functor func, PGM_Idx error_code, std::string_view extra_msg = {})
32-
-> std::invoke_result_t<Functor> {
31+
inline auto call_with_catch(PGM_Handle* handle, Functor func, PGM_Idx error_code,
32+
std::string_view extra_msg = {}) -> std::invoke_result_t<Functor> {
3333
if (handle) {
3434
PGM_clear_error(handle);
3535
}

tests/cpp_unit_tests/test_counting_iterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TEST_CASE("Counting Iterator") {
2424
CHECK(*IdxCount{0} == 0);
2525
CHECK(*IdxCount{2} == 2);
2626
CHECK(*(++IdxCount{0}) == 1);
27-
CHECK(*(IdxCount{0} ++) == 0);
27+
CHECK(*(IdxCount { 0 } ++) == 0);
2828
CHECK(*(IdxCount{0} + 1) == 1);
2929
CHECK(IdxRange{IdxRange{1, 3}.begin(), IdxRange{1, 3}.end()}.size() == 2);
3030
CHECK(*IdxRange{IdxRange{1, 3}.begin(), IdxRange{1, 3}.end()}.begin() == 1);

tests/cpp_unit_tests/test_iterator_facade.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ template <advance_type_c advance_type_t, typename UnderlyingType> class BaseTest
6161
return *it_;
6262
}
6363

64-
friend constexpr auto operator<=>(BaseTestIterator const& first, BaseTestIterator const& second)
65-
-> std::strong_ordering {
64+
friend constexpr auto operator<=>(BaseTestIterator const& first,
65+
BaseTestIterator const& second) -> std::strong_ordering {
6666
first.last_call_ = IteratorFacadeableCalls::distance_to;
6767
return *first.it_ <=> *second.it_;
6868
}

0 commit comments

Comments
 (0)