From c5ac28fc452766cc163c5fdf38a86a42e9f6e64e Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 25 Mar 2024 14:59:40 +0800 Subject: [PATCH] fix build --- include/luisa/core/fiber.h | 4 ++-- src/ext/CMakeLists.txt | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/luisa/core/fiber.h b/include/luisa/core/fiber.h index 824dd02ac..8eefeb3a1 100644 --- a/include/luisa/core/fiber.h +++ b/include/luisa/core/fiber.h @@ -91,7 +91,7 @@ class future { public: future() noexcept : _future{sizeof(T)} {} [[nodiscard]] T &wait() noexcept { - return *reinterpret_cast(_future.wait()); + return *static_cast(_future.wait()); } template requires(std::is_constructible_v) @@ -104,7 +104,7 @@ class future { reinterpret_cast(ptr)->~T(); }); } - [[nodiscard]] bool test() const noexcept { _future.test(); } + [[nodiscard]] bool test() const noexcept { return _future.test(); } void clear() const noexcept { _future.clear(); } private: detail::typeless_future _future; diff --git a/src/ext/CMakeLists.txt b/src/ext/CMakeLists.txt index ab085cc43..311795e96 100644 --- a/src/ext/CMakeLists.txt +++ b/src/ext/CMakeLists.txt @@ -152,12 +152,6 @@ target_include_directories(half INTERFACE $