mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Minimal restructuring of value.h
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
2e46db4369
commit
916c0cbfbc
@@ -45,6 +45,10 @@ enum Value {
|
||||
|
||||
ENABLE_OPERATORS_ON(Value)
|
||||
|
||||
// Extra operators
|
||||
inline Value operator+ (Value v, int i) { return Value(int(v) + i); }
|
||||
inline Value operator- (Value v, int i) { return Value(int(v) - i); }
|
||||
|
||||
|
||||
enum ScaleFactor {
|
||||
SCALE_FACTOR_ZERO = 0,
|
||||
@@ -104,10 +108,6 @@ inline void operator/= (Score& d, int i) { d = Score(int(d) / i); }
|
||||
//// Inline functions
|
||||
////
|
||||
|
||||
inline Value operator+ (Value v, int i) { return Value(int(v) + i); }
|
||||
inline Value operator- (Value v, int i) { return Value(int(v) - i); }
|
||||
|
||||
|
||||
inline Value value_mate_in(int ply) {
|
||||
return VALUE_MATE - ply;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user