diff --git a/cmake/dependencies/interval_tree.cmake b/cmake/dependencies/interval_tree.cmake index 343dd8b..023f132 100644 --- a/cmake/dependencies/interval_tree.cmake +++ b/cmake/dependencies/interval_tree.cmake @@ -1,6 +1,6 @@ option(NUI_FETCH_INTERVAL_TREE "Fetch interval tree" ON) set(NUI_INTERVAL_TREE_GIT_REPOSITORY "https://github.com/5cript/interval-tree.git" CACHE STRING "interval tree git repository") -set(NUI_INTERVAL_TREE_GIT_TAG "v2.2.4" CACHE STRING "interval tree git tag") +set(NUI_INTERVAL_TREE_GIT_TAG "v2.3.2" CACHE STRING "interval tree git tag") if(NUI_FETCH_INTERVAL_TREE) include(FetchContent) diff --git a/cmake/dependencies/roar.cmake b/cmake/dependencies/roar.cmake index 94f326f..a502286 100644 --- a/cmake/dependencies/roar.cmake +++ b/cmake/dependencies/roar.cmake @@ -1,6 +1,6 @@ option(NUI_FETCH_ROAR "Fetch roar" ON) set(NUI_ROAR_REPOSITORY "https://github.com/5cript/roar.git" CACHE STRING "roar repository") -set(NUI_ROAR_TAG "2781a88fcd1fce9af1a697673e26fd3ad55817e9" CACHE STRING "roar tag") +set(NUI_ROAR_TAG "a8eda5bc6d4800a8f389a3007e793eb233ea6192" CACHE STRING "roar tag") if(NUI_FETCH_ROAR) include(FetchContent) diff --git a/nui/include/nui/event_system/range_event_context.hpp b/nui/include/nui/event_system/range_event_context.hpp index f1b1c74..9568519 100644 --- a/nui/include/nui/event_system/range_event_context.hpp +++ b/nui/include/nui/event_system/range_event_context.hpp @@ -45,7 +45,7 @@ namespace Nui } friend bool operator==(RangeStateInterval const& lhs, RangeStateInterval const& rhs) { - return lhs.start_ == rhs.start_ && lhs.end_ == rhs.end_ && lhs.type_ == rhs.type_; + return lhs.low_ == rhs.low_ && lhs.high_ == rhs.high_; } friend bool operator!=(RangeStateInterval const& lhs, RangeStateInterval const& rhs) { diff --git a/nui/include/nui/utility/scope_exit.hpp b/nui/include/nui/utility/scope_exit.hpp index e013ed9..7324812 100644 --- a/nui/include/nui/utility/scope_exit.hpp +++ b/nui/include/nui/utility/scope_exit.hpp @@ -16,11 +16,28 @@ namespace Nui {} ~ScopeExit() { - onExit_(); + if (onExit_) + onExit_(); } + ScopeExit(ScopeExit&& other) + : onExit_(std::move(other.onExit_)) + { + other.onExit_ = {}; + } + ScopeExit& operator=(ScopeExit&& other) + { + if (this != &other) + { + onExit_ = std::move(other.onExit_); + other.onExit_ = {}; + } + return *this; + } + ScopeExit(const ScopeExit&) = delete; + ScopeExit& operator=(const ScopeExit&) = delete; void disarm() { - onExit_ = [] {}; + onExit_ = {}; } private: