mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00: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:
parent
2608b9249d
commit
8751b18cf0
1 changed files with 1 additions and 1 deletions
|
@ -383,7 +383,7 @@ bool Book::open(const char* fName) {
|
|||
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())
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue