]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/app.h
Don't return a dangling pointer from wxDateTime::ParseXXX(wxCStrData).
[wxWidgets.git] / include / wx / app.h
index 3787654e9ec639bb9d6d060380a4762ef916dd61..17b7a2c7a27b5c5e3eba5f2e80e7c69c5aff2571 100644 (file)
@@ -795,6 +795,7 @@ public:
 // Use this macro if you want to define your own main() or WinMain() function
 // and call wxEntry() from there.
 #define wxIMPLEMENT_APP_NO_MAIN(appname)                                    \
+    appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); }    \
     wxAppConsole *wxCreateApp()                                             \
     {                                                                       \
         wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE,         \
@@ -802,9 +803,7 @@ public:
         return new appname;                                                 \
     }                                                                       \
     wxAppInitializer                                                        \
-        wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp);        \
-    appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); }    \
-    wxDECLARE_APP(appname)
+        wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp)
 
 // Same as wxIMPLEMENT_APP() normally but doesn't include themes support in
 // wxUniversal builds