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
@@ -210,7 +210,7 @@ void CalculationResult::UpdateTextState()
|
||||
|
||||
if (widthDiff > WIDTHCUTOFF)
|
||||
{
|
||||
fontSizeChange = min(max(floor(WIDTHTOFONTSCALAR * widthDiff) - WIDTHTOFONTOFFSET, INCREMENTOFFSET), MAXFONTINCREMENT);
|
||||
fontSizeChange = min<double>(max<double>(floor(WIDTHTOFONTSCALAR * widthDiff) - WIDTHTOFONTOFFSET, INCREMENTOFFSET), MAXFONTINCREMENT);
|
||||
}
|
||||
if (m_textBlock->ActualWidth < containerSize && abs(m_textBlock->FontSize - m_startingFontSize) > FONTTOLERANCE && !m_haveCalculatedMax)
|
||||
{
|
||||
|
@@ -8,6 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Windows headers define min/max macros.
|
||||
// Disable it for project code.
|
||||
#define NOMINMAX
|
||||
|
||||
#include <collection.h>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
|
Reference in New Issue
Block a user