From 1b834e8e497e4e03017b6a3181da281865529dd2 Mon Sep 17 00:00:00 2001 From: Soham Roy Date: Thu, 14 Oct 2021 06:51:21 +0000 Subject: [PATCH] Replaced macro redefinition with appropriate usage --- src/core/include/units/quantity_cast.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/core/include/units/quantity_cast.h b/src/core/include/units/quantity_cast.h index 9c6d218a..2a138884 100644 --- a/src/core/include/units/quantity_cast.h +++ b/src/core/include/units/quantity_cast.h @@ -29,12 +29,8 @@ #include #include -#define UNITS_PRAGMA(X) _Pragma(#X) -#ifdef _MSC_VER -#define UNITS_DIAGNOSTIC_PUSH UNITS_PRAGMA(warning(push)) -#define UNITS_DIAGNOSTIC_IGNORE_LOSSY_CONVERSION UNITS_PRAGMA(warning(disable : 4244)) -// warning C4244: 'argument': conversion from 'intmax_t' to 'T', possible loss of data with T=int -#endif //_MSC_VER +UNITS_DIAGNOSTIC_PUSH +UNITS_DIAGNOSTIC_IGNORE(4244) // warning C4244: 'argument': conversion from 'intmax_t' to 'T', possible loss of data with T=int namespace units { @@ -388,6 +384,4 @@ template } // namespace units -#ifdef _MSC_VER -#pragma warning (pop) -#endif //_MSC_VER +UNITS_DIAGNOSTIC_POP