Use std::min and std::max, not the misc versions.

This commit is contained in:
2025-08-10 17:08:42 -04:00
parent 6c3bf19bbd
commit 640ccd02d3
26 changed files with 216 additions and 226 deletions

View File

@ -327,9 +327,9 @@ inline void FltkImgbuf::scaleBuffer (const core::byte *src, int srcWidth,
for(int x = 0; x < destWidth; x++) {
for(int y = 0; y < destHeight; y++) {
int xo1 = x * srcWidth / destWidth;
int xo2 = lout::misc::max ((x + 1) * srcWidth / destWidth, xo1 + 1);
int xo2 = std::max ((x + 1) * srcWidth / destWidth, xo1 + 1);
int yo1 = y * srcHeight / destHeight;
int yo2 = lout::misc::max ((y + 1) * srcHeight / destHeight, yo1 + 1);
int yo2 = std::max ((y + 1) * srcHeight / destHeight, yo1 + 1);
int n = (xo2 - xo1) * (yo2 - yo1);
for(int i = 0; i < bpp; i++)
@ -489,8 +489,8 @@ void FltkImgbuf::copyTo (Imgbuf *dest, int xDestRoot, int yDestRoot,
FltkImgbuf *fDest = (FltkImgbuf*)dest;
assert (bpp == fDest->bpp);
int xSrc2 = lout::misc::min (xSrc + widthSrc, fDest->width - xDestRoot);
int ySrc2 = lout::misc::min (ySrc + heightSrc, fDest->height - yDestRoot);
int xSrc2 = std::min (xSrc + widthSrc, fDest->width - xDestRoot);
int ySrc2 = std::min (ySrc + heightSrc, fDest->height - yDestRoot);
//printf ("copying from (%d, %d), %d x %d to (%d, %d) (root) => "
// "xSrc2 = %d, ySrc2 = %d\n",