X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftypes.h;h=2766cb333857badd05fe2a7d0baa2d192b17ebb9;hb=a8af78c833458adaea64b8fc1035fafbdf4ba083;hp=e0760ded99523e9fe1de6f2cb3767ce40b1efd2d;hpb=13a73f67c018e58b2fd46f886c45ef2b75188c8e;p=stockfish diff --git a/src/types.h b/src/types.h index e0760ded..2766cb33 100644 --- a/src/types.h +++ b/src/types.h @@ -249,14 +249,14 @@ enum Score { inline Score make_score(int mg, int eg) { return Score((mg << 16) + eg); } -/// Extracting the signed lower and upper 16 bits it not so trivial because +/// Extracting the signed lower and upper 16 bits is not so trivial because /// according to the standard a simple cast to short is implementation defined /// and so is a right shift of a signed integer. inline Value mg_value(Score s) { return Value(((s + 0x8000) & ~0xffff) / 0x10000); } /// On Intel 64 bit we have a small speed regression with the standard conforming -/// version, so use a faster code in this case that, although not 100% standard -/// compliant it seems to work for Intel and MSVC. +/// version. Therefore, in this case we use a faster code in this case that, +/// although not 100% standard compliant it seems to work for Intel and MSVC. #if defined(IS_64BIT) && (!defined(__GNUC__) || defined(__INTEL_COMPILER)) inline Value eg_value(Score s) { return Value(int16_t(s & 0xffff)); }