mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Minimal restructuring of value.h
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
2e46db4369
commit
916c0cbfbc
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue