summaryrefslogtreecommitdiffstats
path: root/src/event_to_string.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-14 13:13:56 +0100
committerDavid Robillard <d@drobilla.net>2020-12-14 13:13:56 +0100
commitc7cc84afee9b6d8b196679bf784751c4052020a3 (patch)
treeb78ad7c13975f977d683698694d661972160e038 /src/event_to_string.cpp
parent6417299c90009f1eca68d58d62f8e46043aabce3 (diff)
downloadpatchage-c7cc84afee9b6d8b196679bf784751c4052020a3.tar.gz
patchage-c7cc84afee9b6d8b196679bf784751c4052020a3.tar.bz2
patchage-c7cc84afee9b6d8b196679bf784751c4052020a3.zip
Clean up includes
Diffstat (limited to 'src/event_to_string.cpp')
-rw-r--r--src/event_to_string.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/event_to_string.cpp b/src/event_to_string.cpp
index ef9d2c1..788f42e 100644
--- a/src/event_to_string.cpp
+++ b/src/event_to_string.cpp
@@ -16,8 +16,14 @@
#include "event_to_string.hpp"
+#include "ClientID.hpp"
+#include "ClientInfo.hpp"
#include "ClientType.hpp"
#include "Event.hpp"
+#include "PortID.hpp"
+#include "PortInfo.hpp"
+#include "PortType.hpp"
+#include "SignalDirection.hpp"
#include "warnings.hpp"
PATCHAGE_DISABLE_FMT_WARNINGS
@@ -25,8 +31,10 @@ PATCHAGE_DISABLE_FMT_WARNINGS
#include <fmt/ostream.h>
PATCHAGE_RESTORE_WARNINGS
-#include <cstdint>
-#include <iostream>
+#include <boost/optional/optional.hpp>
+#include <boost/variant/apply_visitor.hpp>
+
+#include <ostream> // IWYU pragma: keep
#include <string>
namespace patchage {
@@ -104,7 +112,7 @@ struct EventPrinter
std::string operator()(const PortCreationEvent& event)
{
- auto result = fmt::format("Add{} {} {} port \"{}\" (\"{}\")",
+ auto result = fmt::format(R"(Add{} {} {} port "{}" ("{}"))",
event.info.is_terminal ? " terminal" : "",
(*this)(event.info.type),
(*this)(event.info.direction),
@@ -120,12 +128,12 @@ struct EventPrinter
std::string operator()(const PortDestructionEvent& event)
{
- return fmt::format("Remove port \"{}\"", event.id);
+ return fmt::format(R"("Remove port "{}")", event.id);
}
std::string operator()(const ConnectionEvent& event)
{
- return fmt::format("Connect \"{}\" to \"{}\"", event.tail, event.head);
+ return fmt::format(R"(Connect "{}" to "{}")", event.tail, event.head);
}
std::string operator()(const DisconnectionEvent& event)