From ee7dbf946a77450e8bf49ea4b64e9b922a951c1f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 29 Jun 2016 10:35:01 +0200 Subject: compat/options: make inline to fix lto --- opentrack-compat/options.cpp | 7 +------ opentrack-compat/options.hpp | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'opentrack-compat') diff --git a/opentrack-compat/options.cpp b/opentrack-compat/options.cpp index 05ae692a..4106f783 100644 --- a/opentrack-compat/options.cpp +++ b/opentrack-compat/options.cpp @@ -175,11 +175,6 @@ opts::opts(const QString &name) : b(bundle(name)) { } -pbundle bundle(const QString& name) -{ - return detail::singleton().bundle(name); -} - custom_type_initializer::custom_type_initializer() { qDebug() << "options: registering stream operators"; @@ -188,7 +183,7 @@ custom_type_initializer::custom_type_initializer() QMetaType::registerDebugStreamOperator(); } -custom_type_initializer custom_type_initializer::singleton = custom_type_initializer(); +custom_type_initializer custom_type_initializer::singleton; namespace detail { diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp index 20f26d26..d7101674 100644 --- a/opentrack-compat/options.hpp +++ b/opentrack-compat/options.hpp @@ -198,7 +198,10 @@ namespace options { using pbundle = std::shared_ptr; - pbundle bundle(const QString& name); + inline pbundle bundle(const QString& name) + { + return detail::singleton().bundle(name); + } #define DEFINE_SLOT(t) void setValue(t datum) { store(datum); } #define DEFINE_SIGNAL(t) void valueChanged(t) -- cgit v1.2.3