Skip to content

Commit

Permalink
sch: unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Aug 9, 2024
1 parent 47221ec commit bd1f734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 0 additions & 9 deletions code/espurna/scheduler_common.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,6 @@ bool handle_delta(Context& ctx, const Pending& pending) {
return false;
}

bool handle_delta(Context& ctx, decltype(Context::pending)::iterator it) {
if (handle_delta(ctx, *it)) {
ctx.pending.erase(it);
return true;
}

return false;
}

} // namespace restore

} // namespace
Expand Down
5 changes: 3 additions & 2 deletions code/test/unit/src/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,16 +522,17 @@ void test_restore_delta_past() {
TEST_ASSERT_EQUAL(1, ctx.pending.size());

TEST_ASSERT_TRUE(
restore::handle_delta(ctx, ctx.pending.begin()));
restore::handle_delta(ctx, ctx.pending[0]));
TEST_ASSERT_EQUAL(1, ctx.results.size());
TEST_ASSERT_EQUAL(0, ctx.pending.size());
TEST_ASSERT_EQUAL(1, ctx.pending.size());

TEST_ASSERT_EQUAL(test.index, ctx.results[0].index);
TEST_ASSERT_EQUAL(
datetime::Minutes(test.hours).count(),
ctx.results[0].offset.count());

ctx.results.clear();
ctx.pending.clear();
}
}

Expand Down

0 comments on commit bd1f734

Please sign in to comment.