Disable use of min/max macros defined by Windows headers. (#363)
Description of the changes: Disable Windows-provided min/max macros using the NOMINMAX flag. Add the flag to each project's pch to disable the macros across the solution. How changes were validated: Project builds. Unit tests pass. Smoke tests. Fixes #362.
This commit is contained in:
committed by
Howard Wolosky
parent
e55ffe5b8d
commit
19e61e2b53
@@ -1271,7 +1271,7 @@ PNUMBER RatToNumber(_In_ PRAT prat, uint32_t radix, int32_t precision)
|
||||
// Convert p and q of rational form from internal base to requested base.
|
||||
// Scale by largest power of BASEX possible.
|
||||
long scaleby = min(temprat->pp->exp, temprat->pq->exp);
|
||||
scaleby = max(scaleby, 0);
|
||||
scaleby = max(scaleby, 0l);
|
||||
|
||||
temprat->pp->exp -= scaleby;
|
||||
temprat->pq->exp -= scaleby;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "pch.h"
|
||||
#include "ratpak.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
void lshrat( PRAT *pa, PRAT b, uint32_t radix, int32_t precision)
|
||||
|
||||
|
@@ -225,7 +225,7 @@ memmove( (x)->pp->mant, &((x)->pp->mant[trim]), sizeof(MANTTYPE)*((x)->pp->cdigi
|
||||
(x)->pp->cdigit -= trim; \
|
||||
(x)->pp->exp += trim; \
|
||||
} \
|
||||
trim = min((x)->pp->exp,(x)->pq->exp);\
|
||||
trim = std::min((x)->pp->exp,(x)->pq->exp);\
|
||||
(x)->pp->exp -= trim;\
|
||||
(x)->pq->exp -= trim;\
|
||||
}
|
||||
|
Reference in New Issue
Block a user