use absl optional

pull/850/head
jeff 5 years ago
parent 3c1d5518d8
commit 605da68e15

@ -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

@ -4,6 +4,7 @@
#include <util/mem.h>
#include <util/thread/threadpool.h>
#include <util/thread/timer.hpp>
#include <absl/types/optional.h>
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();

Loading…
Cancel
Save