summaryrefslogtreecommitdiffhomepage
path: root/opentrack-compat/options.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-11-01 11:29:24 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-11-01 11:29:24 +0100
commitbe36337e46218c6f843a478036497a3f494502ed (patch)
treedbb9dcb91f8a0233d3facb91e7d860c23a97ca4c /opentrack-compat/options.cpp
parent0424a2802aec3600774ba9347c49312bb09b8cfe (diff)
options: don't define options singleton in every module
Instead, define in opentrack-api.so only. Also, move to opentrack-compat to break a circular dependency
Diffstat (limited to 'opentrack-compat/options.cpp')
-rw-r--r--opentrack-compat/options.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/opentrack-compat/options.cpp b/opentrack-compat/options.cpp
new file mode 100644
index 00000000..91cd3664
--- /dev/null
+++ b/opentrack-compat/options.cpp
@@ -0,0 +1,16 @@
+#include "options.hpp"
+
+namespace options
+{
+
+namespace detail
+{
+OPENTRACK_COMPAT_EXPORT opt_singleton& singleton()
+{
+ static auto ret = std::make_shared<opt_singleton>();
+ return *ret;
+}
+
+}
+
+}