Skip to content

Commit

Permalink
fix C4244 error
Browse files Browse the repository at this point in the history
  • Loading branch information
bwrsandman committed May 10, 2024
1 parent 963f229 commit f26b30a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/anmtool/tiny_gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,7 @@ bool GetFileSizeInBytes(size_t *filesize_out, std::string *err,
return false;
}

(*filesize_out) = sz;
(*filesize_out) = static_cast<size_t>(sz);
return true;
#endif
}
Expand Down Expand Up @@ -3137,7 +3137,7 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
return false;
}

out->resize(sz);
out->resize(static_cast<size_t>(sz));
f.read(reinterpret_cast<char *>(&out->at(0)),
static_cast<std::streamsize>(sz));

Expand Down
4 changes: 2 additions & 2 deletions apps/l3dtool/tiny_gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,7 @@ bool GetFileSizeInBytes(size_t *filesize_out, std::string *err,
return false;
}

(*filesize_out) = sz;
(*filesize_out) = static_cast<size_t>(sz);
return true;
#endif
}
Expand Down Expand Up @@ -3137,7 +3137,7 @@ bool ReadWholeFile(std::vector<unsigned char> *out, std::string *err,
return false;
}

out->resize(sz);
out->resize(static_cast<size_t>(sz));
f.read(reinterpret_cast<char *>(&out->at(0)),
static_cast<std::streamsize>(sz));

Expand Down

0 comments on commit f26b30a

Please sign in to comment.