From 6346b54c1318a520dbdf1c8c812e651cb3007b72 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 15 May 2021 03:53:30 +0200 Subject: [PATCH] Tweak Lua API, avoid translated sting as return value --- libs/ardour/ardour/lua_api.h | 4 +++- libs/ardour/plugin_manager.cc | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ardour/ardour/lua_api.h b/libs/ardour/ardour/lua_api.h index bfdf5abc41..c4f942a073 100644 --- a/libs/ardour/ardour/lua_api.h +++ b/libs/ardour/ardour/lua_api.h @@ -79,7 +79,9 @@ namespace ARDOUR { namespace LuaAPI { /** List all installed plugins */ std::list > list_plugins (); - /** Write a list of untagged plugins to a file, so we can bulk-tag them */ + /** Write a list of untagged plugins to a file, so we can bulk-tag them + * @returns path to XML file or empty string on error + */ std::string dump_untagged_plugins (); /** search a Plugin diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index e8fc66fb1c..bcbd92161f 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -2188,7 +2188,6 @@ PluginManager::save_plugin_order_file (XMLNode &elem) const std::string PluginManager::dump_untagged_plugins () { - std::string retval; std::string path = Glib::build_filename (user_plugin_metadata_dir(), "untagged_plugins"); XMLNode* root = new XMLNode (X_("PluginTags")); @@ -2214,11 +2213,10 @@ PluginManager::dump_untagged_plugins () XMLTree tree; tree.set_root (root); if (tree.write (path)) { - retval = path; + return path; } else { - retval = string_compose (_("ERROR: Could not save Plugin Tags info to %1"), path); + return ""; } - return retval; } void