Skip to content

Commit 8ddcb14

Browse files
committed
cleanup todos
Signed-off-by: Nitish Bharambe <[email protected]>
1 parent 618da38 commit 8ddcb14

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

power_grid_model_c/power_grid_model/include/power_grid_model/container_fwd.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ concept storagable_single_component_container_c =
4141
{ nc.template emplace<StoragableType>(id, args...) } -> std::same_as<void>;
4242
};
4343

44-
// TODO This compound function is excluded from above concepts
45-
// { c.template get_start_idx<GettableBaseType, StoragableType>() } -> std::same_as<Idx>;
46-
4744
} // namespace detail
4845

4946
template <typename ContainerType, typename... RetrievableType>

power_grid_model_c/power_grid_model/include/power_grid_model/main_core/container_queries.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ template <std::derived_from<Base> BaseComponent, std::derived_from<Base> Compone
4747
requires std::derived_from<Component, BaseComponent> &&
4848
common::component_container_c<ComponentContainer, BaseComponent> &&
4949
common::storagable_component_container_c<ComponentContainer, Component>
50-
constexpr Idx get_component_sequence_offset(ComponentContainer const& components) {
50+
constexpr auto get_component_sequence_offset(ComponentContainer const& components) {
5151
return components.template get_start_idx<BaseComponent, Component>();
5252
}
5353

power_grid_model_c/power_grid_model/include/power_grid_model/main_core/update.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ check_update_independence(typename ModelType::ComponentContainer const& componen
161161
} // namespace independence
162162
namespace detail {
163163

164-
// TODO change to components
165164
template <component_c Component, class ComponentContainer, std::ranges::viewable_range Elements,
166165
std::output_iterator<Idx2D> OutputIterator>
167166
requires common::component_container_c<ComponentContainer, Component>

power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,12 @@ class MainModelImpl<ExtraRetrievableTypes<ExtraRetrievableType...>, ComponentLis
287287
/*
288288
the the sequence indexer given an input array of ID's for a given component type
289289
*/
290-
// TODO change to components
291290
void get_indexer(std::string_view component_type, ID const* id_begin, Idx size, Idx* indexer_begin) const {
292-
auto const get_index_func = [&state = this->state_, component_type, id_begin, size,
291+
auto const get_index_func = [&components = this->state_.components, component_type, id_begin, size,
293292
indexer_begin]<typename CT>() {
294293
if (component_type == CT::name) {
295-
std::transform(id_begin, id_begin + size, indexer_begin, [&state](ID id) {
296-
return main_core::get_component_idx_by_id<CT>(state.components, id).pos;
294+
std::transform(id_begin, id_begin + size, indexer_begin, [&components](ID id) {
295+
return main_core::get_component_idx_by_id<CT>(components, id).pos;
297296
});
298297
}
299298
};

0 commit comments

Comments
 (0)