From 6754e045bcca541dd7acd4003d13a01ff537c234 Mon Sep 17 00:00:00 2001 From: Tomasz Dolbniak Date: Thu, 16 Jan 2025 09:33:30 +0100 Subject: [PATCH] Revert: Exclude the for-loops for zero-arity nodes --- .../luci/lang/include/luci/IR/CircleNodeMixins.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/compiler/luci/lang/include/luci/IR/CircleNodeMixins.h b/compiler/luci/lang/include/luci/IR/CircleNodeMixins.h index 7b8c88fb744..158d65d902f 100644 --- a/compiler/luci/lang/include/luci/IR/CircleNodeMixins.h +++ b/compiler/luci/lang/include/luci/IR/CircleNodeMixins.h @@ -72,13 +72,10 @@ template class FixedArityNode : public Base public: FixedArityNode() { - if constexpr (N > 0) + _args.resize(N); + for (uint32_t n = 0; n < N; ++n) { - _args.resize(N); - for (uint32_t n = 0; n < N; ++n) - { - _args[n] = std::make_unique(this); - } + _args[n] = std::make_unique(this); } } @@ -91,12 +88,9 @@ template class FixedArityNode : public Base void drop(void) final { - if constexpr (N > 0) + for (uint32_t n = 0; n < N; ++n) { - for (uint32_t n = 0; n < N; ++n) - { - _args.at(n)->node(nullptr); - } + _args.at(n)->node(nullptr); } }