Unverified Commit 1516cf31 authored by pfeatherstone's avatar pfeatherstone Committed by GitHub
Browse files

[MATRIX] bug fix. If you #include <dlib/matrix.h> in a header file you might...


[MATRIX] bug fix. If you #include <dlib/matrix.h> in a header file you might get a compiler error saying ambiguous call to max(). This commit fixes that. (#2287)
Co-authored-by: default avatarpf <pf@pf-ubuntu-dev>
parent 22007f66
......@@ -1009,9 +1009,9 @@ namespace dlib
}
//clamping
c2.l = max(0.0, (116.0 * var_Y) - 16);
c2.a = max(-128.0, min(127.0, 500.0 * (var_X - var_Y)));
c2.b = max(-128.0, min(127.0, 200.0 * (var_Y - var_Z)));
c2.l = std::max(0.0, (116.0 * var_Y) - 16);
c2.a = std::max(-128.0, std::min(127.0, 500.0 * (var_X - var_Y)));
c2.b = std::max(-128.0, std::min(127.0, 200.0 * (var_Y - var_Z)));
return c2;
}
......@@ -1080,9 +1080,9 @@ namespace dlib
}
// clamping
c2.r = max(0.0, min(1.0, var_R));
c2.g = max(0.0, min(1.0, var_G));
c2.b = max(0.0, min(1.0, var_B));
c2.r = std::max(0.0, std::min(1.0, var_R));
c2.g = std::max(0.0, std::min(1.0, var_G));
c2.b = std::max(0.0, std::min(1.0, var_B));
return (c2);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment