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>
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
- size = tellg() / sizeof(BookEntry);
+ size = (size_t)tellg() / sizeof(BookEntry);
if (!good())
{