summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Martínez <mtzguido@gmail.com>2014-10-10 15:16:00 (GMT)
committerGuido Martínez <mtzguido@gmail.com>2014-10-10 19:58:57 (GMT)
commit6b7661b5817060cd3f6c5f167a596923db5ff52a (patch)
treef3ffaa560364d2983d7fe316008984ce6074f3da
parentb30462592cc42e3e85007aea9aa1510858a8aebc (diff)
downloadice-6b7661b5817060cd3f6c5f167a596923db5ff52a.zip
ice-6b7661b5817060cd3f6c5f167a596923db5ff52a.tar.gz
ice-6b7661b5817060cd3f6c5f167a596923db5ff52a.tar.bz2
piece-square: use signed charv0.7
I could have sworn a char was signed by default
-rw-r--r--piece-square.c4
-rw-r--r--piece-square.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/piece-square.c b/piece-square.c
index 20a952f..6928626 100644
--- a/piece-square.c
+++ b/piece-square.c
@@ -93,7 +93,7 @@ static const char t_kingE[8][8] =
{ -50, -30, -30, -30, -30, -30, -30, -50 }
};
-char piece_square_val_O(piece_t piece, i8 r, i8 c) {
+signed char piece_square_val_O(piece_t piece, i8 r, i8 c) {
switch (piece) {
case WPAWN: return t_pawn[r][c];
case WBISHOP: return t_bishop[r][c];
@@ -112,7 +112,7 @@ char piece_square_val_O(piece_t piece, i8 r, i8 c) {
__builtin_unreachable();
}
-char piece_square_val_E(piece_t piece, i8 r, i8 c) {
+signed char piece_square_val_E(piece_t piece, i8 r, i8 c) {
switch (piece) {
case WPAWN: return t_pawn[r][c];
case WBISHOP: return t_bishop[r][c];
diff --git a/piece-square.h b/piece-square.h
index 2eca7dc..d92a42e 100644
--- a/piece-square.h
+++ b/piece-square.h
@@ -9,8 +9,8 @@
* http://chessprogramming.wikispaces.com/Simplified+evaluation+function
*/
-char piece_square_val_O(piece_t piece, i8 r, i8 c);
-char piece_square_val_E(piece_t piece, i8 r, i8 c);
+signed char piece_square_val_O(piece_t piece, i8 r, i8 c);
+signed char piece_square_val_E(piece_t piece, i8 r, i8 c);
void piecePosFullRecalc(void);
#endif