mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-11 20:09:04 +08:00
Do not assign std::streampos to std::streamoff (#321)
This commit is contained in:
parent
fb5ed8ebf8
commit
64e9192d43
@ -54,9 +54,9 @@ Status ObjDecoder::DecodeFromFile(const std::string &file_name,
|
||||
if (!file)
|
||||
return Status(Status::IO_ERROR);
|
||||
// Read the whole file into a buffer.
|
||||
auto file_size = file.tellg();
|
||||
auto pos0 = file.tellg();
|
||||
file.seekg(0, std::ios::end);
|
||||
file_size = file.tellg() - file_size;
|
||||
auto file_size = file.tellg() - pos0;
|
||||
if (file_size == 0)
|
||||
return Status(Status::IO_ERROR);
|
||||
file.seekg(0, std::ios::beg);
|
||||
|
@ -34,9 +34,9 @@ bool PlyDecoder::DecodeFromFile(const std::string &file_name,
|
||||
if (!file)
|
||||
return false;
|
||||
// Read the whole file into a buffer.
|
||||
auto file_size = file.tellg();
|
||||
auto pos0 = file.tellg();
|
||||
file.seekg(0, std::ios::end);
|
||||
file_size = file.tellg() - file_size;
|
||||
auto file_size = file.tellg() - pos0;
|
||||
if (file_size == 0)
|
||||
return false;
|
||||
file.seekg(0, std::ios::beg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user