From 59880b7fa37780780f5b614324afe0ef4283681e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 11 Mar 2015 13:24:11 -0500 Subject: efficiency is overrated - don't cache the return value of user_config_directory_name() since it can be called with different arguments --- libs/ardour/filesystem_paths.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libs/ardour/filesystem_paths.cc') diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 50ef0be314..9005bd01a3 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -50,7 +50,7 @@ user_config_directory_name (int version = -1) } const string config_dir_name = string_compose ("%1%2", X_(PROGRAM_NAME), version); - + #if defined (__APPLE__) || defined (PLATFORM_WINDOWS) return config_dir_name; #else @@ -61,9 +61,7 @@ user_config_directory_name (int version = -1) std::string user_config_directory (int version) { - static std::string p; - - if (!p.empty()) return p; + std::string p; #ifdef __APPLE__ -- cgit v1.2.3