Move static function out of header-file, fix -Wunused-function
authorRobin Gareus <robin@gareus.org>
Thu, 12 Jul 2018 01:28:38 +0000 (03:28 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 12 Jul 2018 01:28:38 +0000 (03:28 +0200)
gtk2_ardour/ardour_http.h
gtk2_ardour/luainstance.cc

index 41bb2a8f79270bff4b5521be34616b4ba48b5057..e209d75d9e4645127f7f170414777189426fff9b 100644 (file)
@@ -92,10 +92,6 @@ class HttpGet {
 char* http_get (const char* url, int* status, bool with_error_logging);
 std::string http_get (const std::string& url, bool with_error_logging);
 
-/* For use from Lua scripts */
-
-static char* http_get_unlogged (const char* url, int* status) { return http_get (url, status, false); }
-static std::string http_get_unlogged (const std::string& url) { return http_get (url, false); }
 
 
 } // namespace
index 8d1644276df555517e0de26e1858e7033dab3a3a..236a5d88e2888a139a4ac9c337840a0ca1583a33 100644 (file)
@@ -363,6 +363,8 @@ const char *luasignalstr[] = {
 }; // namespace
 
 
+static std::string http_get_unlogged (const std::string& url) { return ArdourCurl::http_get (url, false); }
+
 /** special cases for Ardour's Mixer UI */
 namespace LuaMixer {
 
@@ -744,7 +746,7 @@ LuaInstance::register_classes (lua_State* L)
        luabridge::getGlobalNamespace (L)
                .beginNamespace ("ArdourUI")
 
-               .addFunction ("http_get", (std::string (*)(const std::string&))&ArdourCurl::http_get_unlogged)
+               .addFunction ("http_get", &http_get_unlogged)
 
                .addFunction ("processor_selection", &LuaMixer::processor_selection)