Use dcp::compose rather than our own.
[dcpomatic.git] / src / lib / nanomsg.cc
index 61e6c08ce9e66fa738300b9a417267356f71a8b6..24b54f93f404de769a8927542af78586e644581b 100644 (file)
@@ -44,11 +44,11 @@ Nanomsg::Nanomsg (bool server)
        }
        if (server) {
                if ((_endpoint = nn_bind(_socket, NANOMSG_URL)) < 0) {
-                       throw runtime_error(String::compose("Could not bind nanomsg socket (%1)", errno));
+                       throw runtime_error(dcp::compose("Could not bind nanomsg socket (%1)", errno));
                }
        } else {
                if ((_endpoint = nn_connect(_socket, NANOMSG_URL)) < 0) {
-                       throw runtime_error(String::compose("Could not connect nanomsg socket (%1)", errno));
+                       throw runtime_error(dcp::compose("Could not connect nanomsg socket (%1)", errno));
                }
        }
 }
@@ -73,7 +73,7 @@ Nanomsg::send (string s, int timeout)
                if (errno == ETIMEDOUT || errno == EAGAIN) {
                        return false;
                }
-               throw runtime_error(String::compose("Could not send to nanomsg socket (%1)", errno));
+               throw runtime_error(dcp::compose("Could not send to nanomsg socket (%1)", errno));
        } else if (r != int(s.length())) {
                throw runtime_error("Could not send to nanomsg socket (message too big)");
        }