From 3030a6d389296f5a3b8a810c0c9fd907c4762201 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 20 Jun 2019 20:25:34 +0200 Subject: [PATCH] - set Visual C++ compiler to use /permissive- mode and fixed the one error this generated. This also means that Visual Studio 2015 is no longer supported as it has no proper standard conforming compile mode. --- .appveyor.yml | 1 - CMakeLists.txt | 4 ++-- src/win32/i_crash.cpp | 2 +- src/win32/i_main.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4bf214251..621ee3065 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,7 +8,6 @@ clone_depth: 10 image: - Visual Studio 2019 - - Visual Studio 2015 environment: matrix: diff --git a/CMakeLists.txt b/CMakeLists.txt index c14c24816..9e04684de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,9 +182,9 @@ if( MSVC ) # Function-level linking # Disable run-time type information if ( HAVE_VULKAN ) - set( ALL_C_FLAGS "/GF /Gy /GR- /DHAVE_VULKAN" ) + set( ALL_C_FLAGS "/GF /Gy /GR- /permissive- /DHAVE_VULKAN" ) else() - set( ALL_C_FLAGS "/GF /Gy /GR-" ) + set( ALL_C_FLAGS "/GF /Gy /GR- /permissive-" ) endif() # Use SSE 2 as minimum always as the true color drawers needs it for __vectorcall diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index 689e8a2b3..52daf378d 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -511,7 +511,7 @@ HANDLE WriteLogFile(HWND edit) // //========================================================================== -void CreateCrashLog (char *custominfo, DWORD customsize, HWND richlog) +void CreateCrashLog (const char *custominfo, DWORD customsize, HWND richlog) { // Do not collect information more than once. if (NumFiles != 0) diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 0bfcc2e0c..de4b5e2c9 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -98,7 +98,7 @@ // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); -void CreateCrashLog (char *custominfo, DWORD customsize, HWND richedit); +void CreateCrashLog (const char *custominfo, DWORD customsize, HWND richedit); void DisplayCrashLog (); extern uint8_t *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info); void I_FlushBufferedConsoleStuff();