Skip to content

Commit dace8f1

Browse files
committed
sched: remove default ctor of harq_process_handler
1 parent f65c1f7 commit dace8f1

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

lib/scheduler/cell/cell_harq_manager.h

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ class base_harq_process_handle
175175
using harq_impl_type = std::conditional_t<IsDl, dl_harq_process_impl, ul_harq_process_impl>;
176176

177177
public:
178-
base_harq_process_handle() = default;
179178
base_harq_process_handle(harq_pool& pool_, harq_impl_type& h_) : harq_repo(&pool_), impl(&h_) {}
180179

181180
du_ue_index_t ue_index() const { return impl->ue_idx; }
@@ -340,13 +339,29 @@ class harq_pending_retx_list_impl
340339
{
341340
}
342341

343-
reference operator++()
342+
iterator& operator++()
344343
{
345344
++it;
346-
return value();
345+
return *this;
346+
}
347+
iterator operator++(int)
348+
{
349+
iterator ret{*this};
350+
++it;
351+
return ret;
352+
}
353+
reference operator*()
354+
{
355+
srsran_assert(it != pool->harq_pending_retx_list.end(), "Dereferencing list end()");
356+
return handle_type{*pool, *it};
357+
}
358+
pointer operator->()
359+
{
360+
if (it != pool->harq_pending_retx_list.end()) {
361+
return handle_type{*pool, *it};
362+
}
363+
return std::nullopt;
347364
}
348-
reference operator*() { return value(); }
349-
reference value() { return it != pool->harq_pending_retx_list.end() ? handle_type{*pool, *it} : handle_type{}; }
350365

351366
bool operator==(const iterator& other) const { return pool == other.pool and it == other.it; }
352367
bool operator!=(const iterator& other) const { return !(*this == other); }

0 commit comments

Comments
 (0)