diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-30 15:43:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-05 12:58:13 +0100 |
| commit | b03f2277a205ff7e7cdaa12c6e52322ea474a7af (patch) | |
| tree | d6067668105b2f0c6d0651bd1b8bd4186e0b8893 /src/lib/json_server.cc | |
| parent | e46ff5f1cf168fb73ea930f3e8469165e5f6644e (diff) | |
Bump libdcp for raw_convert changes.
raw_convert<string> is gone, so here we use fmt::{to_string,format} instead.
Other raw_converts now use fast_float.
Diffstat (limited to 'src/lib/json_server.cc')
| -rw-r--r-- | src/lib/json_server.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index 92d5c1171..bed563f5a 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -24,7 +24,7 @@ #include "job_manager.h" #include "json_server.h" #include "transcode_job.h" -#include <dcp/raw_convert.h> +#include <fmt/format.h> #include <boost/asio.hpp> #include <boost/bind/bind.hpp> #include <boost/thread.hpp> @@ -40,7 +40,6 @@ using std::shared_ptr; using std::string; using boost::asio::ip::tcp; using boost::thread; -using dcp::raw_convert; #define MAX_LENGTH 512 @@ -228,7 +227,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket) json += "\"name\": \"" + (*i)->json_name() + "\", "; if ((*i)->progress()) { - json += "\"progress\": " + raw_convert<string>((*i)->progress().get()) + ", "; + json += "\"progress\": " + fmt::to_string((*i)->progress().get()) + ", "; } else { json += "\"progress\": unknown, "; } @@ -245,7 +244,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket) } string reply = "HTTP/1.1 200 OK\r\n" - "Content-Length: " + raw_convert<string>(json.length()) + "\r\n" + "Content-Length: " + fmt::to_string(json.length()) + "\r\n" "Content-Type: application/json\r\n" "\r\n" + json + "\r\n"; |
