Move a few declarations to first use.
[ardour.git] / libs / ardour / export_formats_search_path.cc
index 53516be933331047017a6bd5425b7bc02adafa0e..39ccb0de1391f8b6a31f0eba3fbb23950e6e8039 100644 (file)
@@ -17,6 +17,7 @@
 
 */
 
+#include <iostream>
 #include <glibmm/miscutils.h>
 
 #include "ardour/export_formats_search_path.h"
@@ -34,18 +35,18 @@ namespace ARDOUR {
 SearchPath
 export_formats_search_path ()
 {
+       SearchPath spath;
+
+       spath = user_config_directory ();
+       spath.add_subdirectory_to_paths (export_formats_dir_name);
+
        bool export_path_defined = false;
-       SearchPath spath_env (Glib::getenv(export_env_variable_name, export_path_defined));
+       SearchPath spath_env = Glib::getenv (export_env_variable_name, export_path_defined);    
 
        if (export_path_defined) {
-               return spath_env;
+               spath += spath_env;
        }
 
-       SearchPath spath (user_config_directory ());
-
-       spath += ardour_module_directory ();
-       spath.add_subdirectory_to_paths (export_formats_dir_name);
-
        return spath;
 }