From 9b623ea3943165fe7efb5e47a0b5b9452c1599e6 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Wed, 9 May 2018 00:09:55 +0200 Subject: 9.8 --- wx+/app_main.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'wx+/app_main.h') diff --git a/wx+/app_main.h b/wx+/app_main.h index d9559fea..8d2a6eeb 100755 --- a/wx+/app_main.h +++ b/wx+/app_main.h @@ -10,6 +10,7 @@ #include #include + namespace zen { //just some wrapper around a global variable representing the (logical) main application window @@ -22,12 +23,16 @@ bool mainWindowWasSet(); //######################## implementation ######################## +namespace impl +{ inline bool& refMainWndStatus() { static bool status = false; //external linkage! return status; } +} + inline void setMainWindow(wxWindow* window) @@ -35,10 +40,10 @@ void setMainWindow(wxWindow* window) wxTheApp->SetTopWindow(window); wxTheApp->SetExitOnFrameDelete(true); - refMainWndStatus() = true; + impl::refMainWndStatus() = true; } -inline bool mainWindowWasSet() { return refMainWndStatus(); } +inline bool mainWindowWasSet() { return impl::refMainWndStatus(); } } #endif //APP_MAIN_H_08215601837818347575856 -- cgit