Skip to content

Commit 495a0fa

Browse files
committed
Fix a warning with Intel compiler
warning #2259: non-pointer conversion from "int" to "int16_t={short}" may lose significant bits. No functional change.
1 parent 585655b commit 495a0fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ typedef union {
274274

275275
inline Score make_score(int mg, int eg) {
276276
ScoreView v;
277-
v.half.mg = (int16_t)mg - (uint16_t(eg) >> 15);
277+
v.half.mg = (int16_t)(mg - (uint16_t(eg) >> 15));
278278
v.half.eg = (int16_t)eg;
279279
return Score(v.full);
280280
}

0 commit comments

Comments
 (0)