Save SRAM with making `const` bytes `static const`
This commit is contained in:
parent
ce74c6c4f9
commit
0b9f92218c
16
Board.h
16
Board.h
|
|
@ -41,20 +41,20 @@ class Board {
|
|||
};
|
||||
private:
|
||||
|
||||
const byte PTR_SIDE_AND_CASTLERIGHT = 0x08; //byte (1=side, 2,4=white castle, 8,16=black)
|
||||
const byte PTR_PTR_UNMAKE = 0x09; //byte (points to index)
|
||||
const byte PTR_W_KING = 0x0A; // byte (points to index or maybe 64-arr index)
|
||||
static const byte PTR_SIDE_AND_CASTLERIGHT = 0x08; //byte (1=side, 2,4=white castle, 8,16=black)
|
||||
static const byte PTR_PTR_UNMAKE = 0x09; //byte (points to index)
|
||||
static const byte PTR_W_KING = 0x0A; // byte (points to index or maybe 64-arr index)
|
||||
// const byte PTR_B_KING = 0x0B; (PTR_W_KING | COLOR or PTR_W_KING + COLOR)
|
||||
const byte PTR_ZOBRIST = 0x0C; // 4 bytes
|
||||
static const byte PTR_ZOBRIST = 0x0C; // 4 bytes
|
||||
// 0x0D
|
||||
// 0x0E
|
||||
// 0x0F
|
||||
|
||||
const byte PTR_ENPASSANT = 0x18;
|
||||
const byte PTR_REVMOV = 0x19;
|
||||
static const byte PTR_ENPASSANT = 0x18;
|
||||
static const byte PTR_REVMOV = 0x19;
|
||||
|
||||
const byte PTR_UNMAKE_START = 0x28;
|
||||
const byte PTR_UNMAKE_LAST = 0x7F;
|
||||
static const byte PTR_UNMAKE_START = 0x28;
|
||||
static const byte PTR_UNMAKE_LAST = 0x7F;
|
||||
inline byte get_unmake() __attribute__((always_inline)) {
|
||||
return field[PTR_PTR_UNMAKE];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue