mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Fix ambiguity between clamp implementations
There is an ambiguity between global and std clamp implementations when compiling in c++17, and on certain toolchains that are not strictly conforming to c++11. This is solved by putting our clamp implementation in a namespace. closes https://github.com/official-stockfish/Stockfish/pull/2572 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
9690cd6295
commit
37e3863927
@@ -193,7 +193,7 @@ Score Entry::evaluate_shelter(const Position& pos, Square ksq) {
|
||||
|
||||
Score bonus = make_score(5, 5);
|
||||
|
||||
File center = clamp(file_of(ksq), FILE_B, FILE_G);
|
||||
File center = Utility::clamp(file_of(ksq), FILE_B, FILE_G);
|
||||
for (File f = File(center - 1); f <= File(center + 1); ++f)
|
||||
{
|
||||
b = ourPawns & file_bb(f);
|
||||
|
||||
Reference in New Issue
Block a user