mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Fix MSVC warning on streampos to size_t conversion
Fix this warning with MSVC 64 bits: warning C4244: '=' : conversion from 'std::streampos' to 'size_t', possible loss of data Point is that std::streampos could be negative, while size_t is always non-negative. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -383,7 +383,7 @@ bool Book::open(const char* fName) {
|
|||||||
return false; // Silently fail if the file is not found
|
return false; // Silently fail if the file is not found
|
||||||
|
|
||||||
// Get the book size in number of entries, we are already at the end of file
|
// Get the book size in number of entries, we are already at the end of file
|
||||||
size = tellg() / sizeof(BookEntry);
|
size = (size_t)tellg() / sizeof(BookEntry);
|
||||||
|
|
||||||
if (!good())
|
if (!good())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user