summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/globals.cpp10
-rw-r--r--options/globals.hpp1
2 files changed, 8 insertions, 3 deletions
diff --git a/options/globals.cpp b/options/globals.cpp
index 3bd185af..dbc6df90 100644
--- a/options/globals.cpp
+++ b/options/globals.cpp
@@ -11,7 +11,7 @@ namespace options::globals::detail {
ini_ctx::ini_ctx() = default;
-bool is_portable_installation()
+static bool is_portable_installation()
{
#if defined _WIN32
// must keep consistent between invocations
@@ -143,7 +143,7 @@ void mark_ini_modified(bool value)
ini.mtx.unlock();
}
-QString ini_directory()
+static QString ini_directory_()
{
QString dir;
@@ -173,4 +173,10 @@ QString ini_directory()
return dir;
}
+QString ini_directory()
+{
+ static const QString dir = ini_directory_();
+ return dir;
+}
+
} // ns options::globals
diff --git a/options/globals.hpp b/options/globals.hpp
index 8032e5d8..5b392055 100644
--- a/options/globals.hpp
+++ b/options/globals.hpp
@@ -44,7 +44,6 @@ auto with_settings_object_(ini_ctx& ini, F&& fun)
OTR_OPTIONS_EXPORT ini_ctx& cur_settings();
OTR_OPTIONS_EXPORT ini_ctx& global_settings();
-OTR_OPTIONS_EXPORT bool is_portable_installation();
} // ns options::globals::detail