CRIOMAIN.CPP: fix min/max undeclared identifier (VC6)
min() and max() are not in scope in this translation unit under VC6. Replace with explicit ternary clamping expression; no new headers needed.
This commit is contained in:
@@ -1008,8 +1008,10 @@ DWORD FAR PASCAL CommWatchProc( LPSTR lpData )
|
||||
{
|
||||
DWORD effectiveBaud = (g_dwRIOBaud != 0) ? g_dwRIOBaud
|
||||
: ((g_nRIOType == 0) ? 9600UL : 115200UL);
|
||||
g_dwRIOPollTimeout = min(50UL, max(5UL,
|
||||
(480000UL + effectiveBaud - 1) / effectiveBaud));
|
||||
{
|
||||
DWORD t = (480000UL + effectiveBaud - 1) / effectiveBaud;
|
||||
g_dwRIOPollTimeout = (t < 5UL) ? 5UL : (t > 50UL ? 50UL : t);
|
||||
}
|
||||
}
|
||||
while(1) {
|
||||
DWORD dwEvtMask = 0;
|
||||
|
||||
Reference in New Issue
Block a user