- 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

@ -144,7 +144,7 @@ void FCommandBuffer::MakeStartPosGood()
{ // The cursor is in front of the visible part of the line
n = CursorPosCells;
}
StartPosCells = std::max(0, n);
StartPosCells = max(0, n);
bool overflow;
StartPos = CharsForCells(StartPosCells, &overflow);
if (overflow)

View file

@ -856,7 +856,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer)
{ // Scroll console buffer down
if (ev->subtype == EV_GUI_WheelDown)
{
RowAdjust = std::max (0, RowAdjust - 3);
RowAdjust = max (0, RowAdjust - 3);
}
else
{

View file

@ -1092,7 +1092,7 @@ void C_SearchForPullins(FExecList *exec, const char *file, FCommandLine &argv)
lastSlash1 = strrchr(file, '/');
lastSlash2 = strrchr(file, '\\');
lastSlash = MAX(lastSlash1, lastSlash2);
lastSlash = max(lastSlash1, lastSlash2);
#endif
for (int i = 1; i < argv.argc(); ++i)

View file

@ -273,7 +273,7 @@ bool C_TabCompleteList ()
}
}
nummatches++;
maxwidth = std::max (maxwidth, strlen (TabCommands[i].TabName.GetChars()));
maxwidth = max (maxwidth, strlen (TabCommands[i].TabName.GetChars()));
}
}
if (nummatches > 1)