From: Carl Hetherington Date: Wed, 25 Nov 2020 12:14:44 +0000 (+0100) Subject: Remove unused method. X-Git-Tag: v2.15.108~13 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=9276310e6c9be6148ea8b465b44af55413dc0dc0 Remove unused method. --- diff --git a/src/lib/cross.h b/src/lib/cross.h index a53e85a2d..8b594177e 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -63,7 +63,6 @@ extern void start_player (); extern uint64_t thread_id (); extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags); extern boost::filesystem::path home_directory (); -extern std::string command_and_read (std::string cmd); extern bool running_32_on_64 (); extern void unprivileged (); extern boost::filesystem::path config_path (); diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 2d43d3801..b6241ec1a 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -268,29 +268,6 @@ home_directory () return getenv("HOME"); } -string -command_and_read (string cmd) -{ - FILE* pipe = popen (cmd.c_str(), "r"); - if (!pipe) { - throw runtime_error ("popen failed"); - } - - string result; - char buffer[128]; - try { - while (fgets(buffer, sizeof(buffer), pipe)) { - result += buffer; - } - } catch (...) { - pclose (pipe); - throw; - } - - pclose (pipe); - return result; -} - /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */ bool running_32_on_64 () diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index dcee2a345..29ef283e6 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -260,12 +260,6 @@ home_directory () return getenv("HOME"); } -string -command_and_read (string) -{ - return ""; -} - /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */ bool running_32_on_64 () diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index 2072ffd4c..2070459de 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -345,12 +345,6 @@ home_directory () return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH")); } -string -command_and_read (string) -{ - return ""; -} - /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */ bool running_32_on_64 ()