summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-16 18:36:30 +0100
committerDavid Robillard <d@drobilla.net>2020-12-16 18:36:30 +0100
commitdd72175482f433f90e2eb90ae31cd73c67c33997 (patch)
tree2c345b52793420da52e4e8a0cb80c8a504976d5d
parent6b49e1320b3d3a6abc1ef9d75d804d3e07380661 (diff)
downloadpatchage-dd72175482f433f90e2eb90ae31cd73c67c33997.tar.gz
patchage-dd72175482f433f90e2eb90ae31cd73c67c33997.tar.bz2
patchage-dd72175482f433f90e2eb90ae31cd73c67c33997.zip
Avoid use of boost::optional::has_value
This fails to compile on CI, only with sanitizers for some reason.
-rw-r--r--src/Canvas.cpp2
-rw-r--r--src/event_to_string.cpp2
2 files changed, 2 insertions, 2 deletions
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);
}