summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 17:58:12 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:42:52 +0100
commit7c991383000520d03acfb7a1adfd834dd7c8e35e (patch)
tree4a80722b54b6e6192a67adaf43f0e1105adaf5b2 /src/PatchageEvent.cpp
parent96b68f0c39b02b41f96245cedcc156c60c3317e2 (diff)
downloadpatchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.tar.gz
patchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.tar.bz2
patchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.zip
Replace boost::format with fmt
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r--src/PatchageEvent.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp
index bb8e057..4df2924 100644
--- a/src/PatchageEvent.cpp
+++ b/src/PatchageEvent.cpp
@@ -32,9 +32,10 @@
# include "AlsaDriver.hpp"
#endif
-#include <boost/format.hpp>
-
-using boost::format;
+PATCHAGE_DISABLE_FMT_WARNINGS
+#include <fmt/core.h>
+#include <fmt/ostream.h>
+PATCHAGE_RESTORE_WARNINGS
void
PatchageEvent::execute(Patchage* patchage)
@@ -68,13 +69,12 @@ PatchageEvent::execute(Patchage* patchage)
if (driver) {
PatchagePort* port = driver->create_port_view(patchage, _port_1);
if (!port) {
- patchage->error_msg(
- (format("Unable to create view for port `%1%'") % _port_1)
- .str());
+ patchage->error_msg(fmt::format(
+ "Unable to create view for port `{}'", _port_1));
}
} else {
patchage->error_msg(
- (format("Unknown type for port `%1%'") % _port_1).str());
+ fmt::format("Unknown type for port `{}'", _port_1));
}
} else if (_type == Type::port_destruction) {
@@ -88,12 +88,10 @@ PatchageEvent::execute(Patchage* patchage)
if (!port_1) {
patchage->error_msg(
- (format("Unable to find port `%1%' to connect") % _port_1)
- .str());
+ fmt::format("Unable to find port `{}' to connect", _port_1));
} else if (!port_2) {
patchage->error_msg(
- (format("Unable to find port `%1%' to connect") % _port_2)
- .str());
+ fmt::format("Unable to find port `{}' to connect", _port_2));
} else {
patchage->canvas()->make_connection(port_1, port_2);
}
@@ -105,12 +103,10 @@ PatchageEvent::execute(Patchage* patchage)
if (!port_1) {
patchage->error_msg(
- (format("Unable to find port `%1%' to disconnect") % _port_1)
- .str());
+ fmt::format("Unable to find port `{}' to disconnect", _port_1));
} else if (!port_2) {
patchage->error_msg(
- (format("Unable to find port `%1%' to disconnect") % _port_2)
- .str());
+ fmt::format("Unable to find port `{}' to disconnect", _port_2));
} else {
patchage->canvas()->remove_edge_between(port_1, port_2);
}