diff options
author | David Robillard <d@drobilla.net> | 2020-11-27 17:58:12 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-27 21:42:52 +0100 |
commit | 7c991383000520d03acfb7a1adfd834dd7c8e35e (patch) | |
tree | 4a80722b54b6e6192a67adaf43f0e1105adaf5b2 /src/JackDriver.cpp | |
parent | 96b68f0c39b02b41f96245cedcc156c60c3317e2 (diff) | |
download | patchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.tar.gz patchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.tar.bz2 patchage-7c991383000520d03acfb7a1adfd834dd7c8e35e.zip |
Replace boost::format with fmt
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r-- | src/JackDriver.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 47996e0..29fedd8 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -28,7 +28,10 @@ # include <jack/metadata.h> #endif -#include <boost/format.hpp> +PATCHAGE_DISABLE_FMT_WARNINGS +#include <fmt/core.h> +PATCHAGE_RESTORE_WARNINGS + #include <jack/jack.h> #include <jack/statistics.h> @@ -37,8 +40,6 @@ #include <set> #include <string> -using boost::format; - JackDriver::JackDriver(Patchage* app) : _app(app) , _client(nullptr) @@ -140,8 +141,8 @@ JackDriver::create_port_view(Patchage* patchage, const PortID& id) jack_port_t* jack_port = jack_port_by_id(_client, id.id.jack_id); if (!jack_port) { - _app->error_msg( - (format("Jack: Failed to find port with ID `%1%'.") % id).str()); + _app->error_msg(fmt::format("Jack: Failed to find port with ID `{}'.", + id.id.jack_id)); return nullptr; } @@ -169,9 +170,9 @@ JackDriver::create_port_view(Patchage* patchage, const PortID& id) } if (parent->get_port(port_name)) { - _app->error_msg((format("Jack: Module `%1%' already has port `%2%'.") % - module_name % port_name) - .str()); + _app->error_msg(fmt::format("Jack: Module `{}' already has port `{}'.", + module_name, + port_name)); return nullptr; } @@ -242,9 +243,9 @@ JackDriver::create_port(PatchageModule& parent, } #endif } else { - _app->warning_msg((format("Jack: Port `%1%' has unknown type `%2%'.") % - jack_port_name(port) % type_str) - .str()); + _app->warning_msg(fmt::format("Jack: Port `{}' has unknown type `{}'.", + jack_port_name(port), + type_str)); return nullptr; } |