From dd72175482f433f90e2eb90ae31cd73c67c33997 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 16 Dec 2020 18:36:30 +0100 Subject: Avoid use of boost::optional::has_value This fails to compile on CI, only with sanitizers for some reason. --- src/Canvas.cpp | 2 +- src/event_to_string.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 423be7d..306c62f 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -76,7 +76,7 @@ Canvas::create_port(Patchage& patchage, const PortID& id, const PortInfo& info) std::string client_name; if (id.type() == PortID::Type::alsa) { const auto client_info = patchage.metadata().client(client_id); - if (!client_info.has_value()) { + if (!client_info) { patchage.log().error(fmt::format( R"(Unable to add port "{}", client "{}" is unknown)", id, diff --git a/src/event_to_string.cpp b/src/event_to_string.cpp index 788f42e..606c512 100644 --- a/src/event_to_string.cpp +++ b/src/event_to_string.cpp @@ -119,7 +119,7 @@ struct EventPrinter event.id, event.info.label); - if (event.info.order.has_value()) { + if (event.info.order) { result += fmt::format(" order: {}", *event.info.order); } -- cgit v1.2.1