diff --git a/src/TyroApp.cpp b/src/TyroApp.cpp index 36605a2..bc7164e 100644 --- a/src/TyroApp.cpp +++ b/src/TyroApp.cpp @@ -67,7 +67,7 @@ public: * * @return int */ - int OnExit() override + int OnExit() final { wxLogDebug("Closing App..."); @@ -84,7 +84,7 @@ public: * @param wxCmdLineParser& parser * @return void */ - void OnInitCmdLine(wxCmdLineParser &parser) override + void OnInitCmdLine(wxCmdLineParser &parser) final { parser.SetDesc(Glob_cmdLineDesc); @@ -98,7 +98,7 @@ public: * @param wxCmdLineParser& parser * @return bool */ - bool OnCmdLineParsed(wxCmdLineParser &parser) override + bool OnCmdLineParsed(wxCmdLineParser &parser) final { // Get un-named parameters this->param_count = parser.GetParamCount(); diff --git a/src/definitions.h b/src/definitions.h index 69740ac..95230e4 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -27,10 +27,6 @@ const wxString APP_LICENSE = "Copyright 2019 Timothy J. Warren\n" "IN THE SOFTWARE."; // Command-line arguments -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wmissing-field-initializers" -#endif const wxCmdLineEntryDesc Glob_cmdLineDesc[] = { { wxCMD_LINE_PARAM, @@ -42,9 +38,6 @@ const wxCmdLineEntryDesc Glob_cmdLineDesc[] = { }, {wxCMD_LINE_NONE} }; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif // Some boilerplate text const wxString TYRO_SAVE_ERROR = "Failed to save the file. Maybe you lack the permissions."; @@ -53,7 +46,6 @@ const wxString TYRO_OPEN_ERROR = "Failed to open the file. Check that it exists, const wxString TYRO_OPEN_ERROR_CAPTION = "Open Failed"; // Font defaults -const int TYRO_DEFAULT_FONT_FAMILY = (int) wxFONTFAMILY_MODERN; #ifdef __WXMAC__ const int TYRO_DEFAULT_FONT_SIZE = 14; #else diff --git a/src/wx_common.h b/src/wx_common.h index a7b35fe..64a7f1c 100644 --- a/src/wx_common.h +++ b/src/wx_common.h @@ -3,16 +3,11 @@ */ #pragma once +// Import the basename c function #include #include "common.h" -// Disable annoying warning -#ifndef __WXMAC__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression" -#endif - #ifdef WX_PRECOMP #include "wx_pch.h" #endif @@ -33,10 +28,6 @@ #include #include -#ifndef __WXMAC__ -#pragma clang diagnostic pop -#endif - /** * Calculate original window size based on size of the current monitor */ @@ -47,7 +38,10 @@ wxSize static CalculateWindowSize() wxLogDebug("Current display: %ix%i", mode.w, mode.h); - wxSize base((int)((float)mode.w * 0.9), (int)((float)mode.h * 0.9)); + auto width = (int)((float)mode.w * 0.9); + auto height = (int)((float)mode.h * 0.9); + + wxSize base(width, height); return base; }