From 6ae887a591a804b30e47cbe47f032ade8c343cd8 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Mon, 14 Oct 2019 19:37:15 +0200 Subject: [PATCH] Fixed VS2017 Build --- neo/idlib/sys/sys_includes.h | 1 + neo/idlib/sys/sys_types.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/neo/idlib/sys/sys_includes.h b/neo/idlib/sys/sys_includes.h index 5008c827..e3d69f48 100644 --- a/neo/idlib/sys/sys_includes.h +++ b/neo/idlib/sys/sys_includes.h @@ -103,6 +103,7 @@ If you have questions concerning this license or the applicable additional terms #pragma warning(disable : 4100) // unreferenced formal parameter #pragma warning(disable : 4127) // conditional expression is constant #pragma warning(disable : 4244) // conversion to smaller type, possible loss of data +#pragma warning(disable : 4267) // RB 'initializing': conversion from 'size_t' to 'int', possible loss of data #pragma warning(disable : 4714) // function marked as __forceinline not inlined #pragma warning(disable : 4996) // unsafe string operations #endif // _MSC_VER diff --git a/neo/idlib/sys/sys_types.h b/neo/idlib/sys/sys_types.h index e49551a6..7af3bbb5 100644 --- a/neo/idlib/sys/sys_types.h +++ b/neo/idlib/sys/sys_types.h @@ -95,16 +95,16 @@ struct idNullPtr { // one pointer member initialized to zero so you can pass NULL as a vararg void* value; - idNullPtr() : value( 0 ) { } + constexpr idNullPtr() : value( 0 ) { } // implicit conversion to all pointer types - template operator T1* () const + template constexpr operator T1* () const { return 0; } // implicit conversion to all pointer to member types - template operator T1 T2::* () const + template constexpr operator T1 T2::* () const { return 0; }