summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/prefs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/prefs.cc')
-rw-r--r--gnuradio-runtime/lib/prefs.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/gnuradio-runtime/lib/prefs.cc b/gnuradio-runtime/lib/prefs.cc
index d03c6777eb..b7fcaada9d 100644
--- a/gnuradio-runtime/lib/prefs.cc
+++ b/gnuradio-runtime/lib/prefs.cc
@@ -36,22 +36,12 @@ namespace fs = boost::filesystem;
namespace gr {
- /*
- * Stub implementations
- */
- static prefs s_default_singleton;
- static prefs *s_singleton = &s_default_singleton;
-
prefs *
prefs::singleton()
{
- return s_singleton;
- }
-
- void
- prefs::set_singleton(prefs *p)
- {
- s_singleton = p;
+ static prefs instance; // Guaranteed to be destroyed.
+ // Instantiated on first use.
+ return &instance;
}
prefs::prefs()