- replaced MIN/MAX in common code.

This commit is contained in:
Christoph Oelckers 2021-10-30 10:46:17 +02:00
commit eb69bbcae0
63 changed files with 200 additions and 236 deletions

View file

@ -644,7 +644,7 @@ void ProcessMouseButtonEvent(NSEvent* theEvent)
break;
}
event.data1 = MIN(KEY_MOUSE1 + [theEvent buttonNumber], NSInteger(KEY_MOUSE8));
event.data1 = min(KEY_MOUSE1 + [theEvent buttonNumber], NSInteger(KEY_MOUSE8));
D_PostEvent(&event);
}

View file

@ -969,7 +969,7 @@ bool I_GetVulkanPlatformExtensions(unsigned int *count, const char **names)
else
{
const bool result = *count >= extensionCount;
*count = std::min(*count, extensionCount);
*count = min(*count, extensionCount);
for (unsigned int i = 0; i < *count; ++i)
{

View file

@ -510,7 +510,7 @@ void FConsoleWindow::NetProgress(const int count)
if (m_netMaxPos > 1)
{
[m_netCountText setStringValue:[NSString stringWithFormat:@"%d / %d", m_netCurPos, m_netMaxPos]];
[m_netProgressBar setDoubleValue:MIN(m_netCurPos, m_netMaxPos)];
[m_netProgressBar setDoubleValue:min(m_netCurPos, m_netMaxPos)];
}
}

View file

@ -66,7 +66,7 @@ static inline char *strlwr(char *str)
}
inline int I_GetNumaNodeCount() { return 1; }
inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max<int>(std::thread::hardware_concurrency(), 1); }
inline int I_GetNumaNodeThreadCount(int numaNode) { return max<int>(std::thread::hardware_concurrency(), 1); }
inline void I_SetThreadNumaNode(std::thread &thread, int numaNode) { }
#endif