X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.h;h=8ad17b502f4d3c0bfc02c03054ff20643fd8c40a;hp=eb4e05c083bdad03b49940d5d28514cfb5836258;hb=5f1843c9cb55afcd3fb1da9e9dc4b0092f25d9f0;hpb=3542033342f15625f808013b69aa8c2d274a2f91 diff --git a/src/misc.h b/src/misc.h index eb4e05c0..8ad17b50 100644 --- a/src/misc.h +++ b/src/misc.h @@ -65,14 +65,6 @@ std::ostream& operator<<(std::ostream&, SyncCout); #define sync_cout std::cout << IO_LOCK #define sync_endl std::endl << IO_UNLOCK -namespace Utility { - -/// Clamp a value between lo and hi. Available in c++17. -template constexpr const T& clamp(const T& v, const T& lo, const T& hi) { - return v < lo ? lo : v > hi ? hi : v; -} - -} /// xorshift64star Pseudo-Random Number Generator /// This class is based on original code written and dedicated