projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3417820
)
Fix a shift overflow warning
author
Marco Costalba
<mcostalba@gmail.com>
Mon, 27 Feb 2012 19:30:34 +0000 (20:30 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Mon, 27 Feb 2012 19:32:41 +0000 (20:32 +0100)
Visual Studio 11 is worried that shift result could
overflow an integer, this is impossible becuase max
value of the shift is 4, but compiler cannot know it.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index
537674c
..
0ffcc79
100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-1520,7
+1520,7
@@
void Position::init() {
Bitboard b = cr;
while (b)
{
- Key k = zobCastle[1 << pop_1st_bit(&b)];
+ Key k = zobCastle[1ULL << pop_1st_bit(&b)];
zobCastle[cr] ^= k ? k : rk.rand<Key>();
}
}