Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino committed Nov 21, 2023
1 parent 7d0744b commit 9453f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rpp/rpp/operators/debounce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class debounce_disposable final : public rpp::composite_disposable_impl<Containe
[](const debounce_disposable_wrapper<Observer, Worker, Container>& handler) -> schedulers::optional_delay_from_now {
auto value_or_duration = handler.disposable->extract_value_or_time();
if (auto* duration = std::get_if<schedulers::duration>(&value_or_duration))
return *duration;
return schedulers::optional_delay_from_now{*duration};

if (auto* value = std::get_if<T>(&value_or_duration))
handler.disposable->get_observer_under_lock()->on_next(std::move(*value));
Expand Down
2 changes: 1 addition & 1 deletion src/rppqt/rppqt/schedulers/main_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class main_thread_scheduler final

QTimer::singleShot(std::chrono::duration_cast<std::chrono::milliseconds>(duration), application, [fn = std::forward<Fn>(fn), handler = std::forward<Handler>(handler), ... args = std::forward<Args>(args)]() mutable {
if (const auto new_duration = fn(handler, args...))
defer_for(new_duration.value(), std::move(fn), std::move(handler), std::move(args)...);
defer_for(new_duration->value, std::move(fn), std::move(handler), std::move(args)...);
});
}

Expand Down

0 comments on commit 9453f2f

Please sign in to comment.