]> git.sesse.net Git - stockfish/commitdiff
Fix a compiler warning
authorjoergoster <osterj165@googlemail.com>
Mon, 10 Feb 2014 21:03:30 +0000 (22:03 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 12 Feb 2014 20:52:21 +0000 (21:52 +0100)
Latest master triggers a compiler warning due
to comparing int64_t to uint64_t.

notation.cpp: In Funktion »std::string pretty_pv(Position&, int, Value, int64_t, Move*)«:
notation.cpp:230:30: Warnung: Vergleich zwischen vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-compare]

This patch should fix it.

No functional change.

src/notation.cpp
src/notation.h

index 4de10aceb3e00fe8aa4b0723658252114d449eef..a57072ef1426d453d430dcd48e8bc803550acc1d 100644 (file)
@@ -212,10 +212,10 @@ static string score_to_string(Value v) {
   return s.str();
 }
 
-string pretty_pv(Position& pos, int depth, Value value, int64_t msecs, Move pv[]) {
+string pretty_pv(Position& pos, int depth, Value value, uint64_t msecs, Move pv[]) {
 
-  const int64_t K = 1000;
-  const int64_t M = 1000000;
+  const uint64_t K = 1000;
+  const uint64_t M = 1000000;
 
   std::stack<StateInfo> st;
   Move* m = pv;
index 730e8416b5da4d843a81211e2c745ce22c801228..117e0a035575c110623d16651b7a2d2fd078aa77 100644 (file)
@@ -30,6 +30,6 @@ std::string score_to_uci(Value v, Value alpha = -VALUE_INFINITE, Value beta = VA
 Move move_from_uci(const Position& pos, std::string& str);
 const std::string move_to_uci(Move m, bool chess960);
 const std::string move_to_san(Position& pos, Move m);
-std::string pretty_pv(Position& pos, int depth, Value score, int64_t msecs, Move pv[]);
+std::string pretty_pv(Position& pos, int depth, Value score, uint64_t msecs, Move pv[]);
 
 #endif // #ifndef NOTATION_H_INCLUDED