projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
e38ad4d
)
Fix a warning under Intel compiler in square.h
author
Marco Costalba
<mcostalba@gmail.com>
Sun, 12 Apr 2009 15:58:30 +0000 (17:58 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Mon, 13 Apr 2009 11:01:55 +0000 (12:01 +0100)
We need to cast to char the whole expression...
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/square.h
patch
|
blob
|
history
diff --git
a/src/square.h
b/src/square.h
index
4f024c9
..
5ebfcc3
100644
(file)
--- a/
src/square.h
+++ b/
src/square.h
@@
-164,7
+164,7
@@
inline File file_from_char(char c) {
}
inline char file_to_char(File f) {
- return char(f - FILE_A) + 'a';
+ return char(f - FILE_A + 'a');
}
inline Rank rank_from_char(char c) {
@@
-172,7
+172,7
@@
inline Rank rank_from_char(char c) {
}
inline char rank_to_char(Rank r) {
- return char(r - RANK_1) + '1';
+ return char(r - RANK_1 + '1');
}
inline Square square_from_string(const std::string& str) {