Skip to content

Commit

Permalink
Tidy throttle.
Browse files Browse the repository at this point in the history
  • Loading branch information
5cript committed Nov 26, 2024
1 parent 92e9fc4 commit 4e86c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nui/include/nui/frontend/api/throttle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Nui
ThrottledFunction(int32_t id, bool calledWhenReady, std::function<void()> func);
~ThrottledFunction();
ThrottledFunction(ThrottledFunction const&) = delete;
ThrottledFunction(ThrottledFunction&& other);
ThrottledFunction(ThrottledFunction&& other) noexcept;
ThrottledFunction& operator=(ThrottledFunction const&) = delete;
ThrottledFunction& operator=(ThrottledFunction&& other);
ThrottledFunction& operator=(ThrottledFunction&& other) noexcept;

/// Calls the function if it is valid.
void operator()();
Expand All @@ -24,7 +24,7 @@ namespace Nui
bool valid() const;

private:
int32_t id_{-1};
int32_t id_;
bool calledWhenReady_;
std::function<void()> func_{};
};
Expand Down

0 comments on commit 4e86c6a

Please sign in to comment.