]> git.sesse.net Git - stockfish/commitdiff
piece_type_to_char() default argument in declaration
authorMarco Costalba <mcostalba@gmail.com>
Sat, 29 Nov 2008 23:38:33 +0000 (00:38 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 29 Nov 2008 23:38:33 +0000 (00:38 +0100)
Default argument should be in declaration where it
is visible through header include, not in definition.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/piece.cpp
src/piece.h

index a4c2220daccfd3ae7c5bc077a8105d81fe3f938a..e06b6be2715c8d9d02f142b60d38ee6c8cafcadb 100644 (file)
@@ -72,7 +72,7 @@ const SquareDelta PawnPush[2] = {
 
 static const char PieceChars[] = " pnbrqk";
 
-char piece_type_to_char(PieceType pt, bool upcase = false) {
+char piece_type_to_char(PieceType pt, bool upcase) {
   return upcase? toupper(PieceChars[pt]) : PieceChars[pt];
 }
 
index 5b66949901dbbf185d8930a472ee7efa01815a4d..59f22425372d4cf6de204f74a3d668322156b680 100644 (file)
@@ -124,7 +124,7 @@ inline SquareDelta pawn_push(Color c) {
 //// Prototypes
 ////
 
-extern char piece_type_to_char(PieceType pt, bool upcase);
+extern char piece_type_to_char(PieceType pt, bool upcase = false);
 extern PieceType piece_type_from_char(char c);
 extern bool piece_is_ok(Piece pc);
 extern bool piece_type_is_ok(PieceType pt);