diff --git a/llarp/util/thread/logic.cpp b/llarp/util/thread/logic.cpp index 8a6c0d803..b27aa4d87 100644 --- a/llarp/util/thread/logic.cpp +++ b/llarp/util/thread/logic.cpp @@ -109,7 +109,7 @@ namespace llarp bool Logic::can_flush() const { - return id.has_value() && id.value() == std::this_thread::get_id(); + return id.value() == std::this_thread::get_id(); } } // namespace llarp diff --git a/llarp/util/thread/logic.hpp b/llarp/util/thread/logic.hpp index 4373ba0d2..3a7ac25b3 100644 --- a/llarp/util/thread/logic.hpp +++ b/llarp/util/thread/logic.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace llarp { @@ -12,7 +13,7 @@ namespace llarp public: struct llarp_threadpool* thread; struct llarp_timer_context* timer; - std::optional< std::thread::id > id; + absl::optional< std::thread::id > id; Logic();