mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
Replaced macro redefinition with appropriate usage
This commit is contained in:
@@ -29,12 +29,8 @@
|
|||||||
#include <units/bits/pow.h>
|
#include <units/bits/pow.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#define UNITS_PRAGMA(X) _Pragma(#X)
|
UNITS_DIAGNOSTIC_PUSH
|
||||||
#ifdef _MSC_VER
|
UNITS_DIAGNOSTIC_IGNORE(4244) // warning C4244: 'argument': conversion from 'intmax_t' to 'T', possible loss of data with T=int
|
||||||
#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
|
|
||||||
|
|
||||||
namespace units {
|
namespace units {
|
||||||
|
|
||||||
@@ -388,6 +384,4 @@ template<PointKind ToPK, Unit ToU, typename PK, typename U, typename Rep>
|
|||||||
|
|
||||||
} // namespace units
|
} // namespace units
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
UNITS_DIAGNOSTIC_POP
|
||||||
#pragma warning (pop)
|
|
||||||
#endif //_MSC_VER
|
|
||||||
|
Reference in New Issue
Block a user