mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-13 22:35:53 +08:00
Fix C4018 warnings in MSVC on WIN32
This commit is contained in:
parent
ed3d1ec2f5
commit
f57d18ad74
@ -3019,12 +3019,12 @@ bool GetFileSizeInBytes(size_t *filesize_out, std::string *err,
|
||||
}
|
||||
|
||||
f.seekg(0, f.end);
|
||||
size_t sz = static_cast<size_t>(f.tellg());
|
||||
const auto sz = f.tellg();
|
||||
|
||||
// std::cout << "sz = " << sz << "\n";
|
||||
f.seekg(0, f.beg);
|
||||
|
||||
if (int64_t(sz) < 0) {
|
||||
if (sz < 0) {
|
||||
if (err) {
|
||||
(*err) += "Invalid file size : " + filepath +
|
||||
" (does the path point to a directory?)";
|
||||
@ -3114,12 +3114,12 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
|
||||
}
|
||||
|
||||
f.seekg(0, f.end);
|
||||
size_t sz = static_cast<size_t>(f.tellg());
|
||||
const auto sz = f.tellg();
|
||||
|
||||
// std::cout << "sz = " << sz << "\n";
|
||||
f.seekg(0, f.beg);
|
||||
|
||||
if (int64_t(sz) < 0) {
|
||||
if (sz < 0) {
|
||||
if (err) {
|
||||
(*err) += "Invalid file size : " + filepath +
|
||||
" (does the path point to a directory?)";
|
||||
|
Loading…
x
Reference in New Issue
Block a user