From 77adaeabaf58ea79496803a83ce9fce582758b78 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 7 Jan 2019 10:03:41 +0100 Subject: compat/base-path: add assert --- compat/base-path.cpp | 4 ++++ compat/base-path.hpp | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compat/base-path.cpp b/compat/base-path.cpp index 4ef3762e..b544a3d1 100644 --- a/compat/base-path.cpp +++ b/compat/base-path.cpp @@ -1,8 +1,12 @@ +#undef NDEBUG +#include + #include "base-path.hpp" #include const QString& application_base_path() { + assert(qApp && "logic error"); static QString const& const_path = QCoreApplication::applicationDirPath(); return const_path; } diff --git a/compat/base-path.hpp b/compat/base-path.hpp index 06e2c703..e80f541f 100644 --- a/compat/base-path.hpp +++ b/compat/base-path.hpp @@ -5,8 +5,7 @@ #include -OTR_COMPAT_EXPORT -cc_noinline +OTR_COMPAT_EXPORT cc_noinline const QString& application_base_path(); #define OPENTRACK_BASE_PATH (application_base_path()) -- cgit v1.2.3