Merge pull request #170 from Ybalrid/msvc_warn_fix

Fix C4267 warning (size_t -> int) convertion
This commit is contained in:
Syoyo Fujita 2019-06-15 15:58:03 +09:00 committed by GitHub
commit 0ccc8dc262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3094,7 +3094,7 @@ static bool ParseAccessor(Accessor *accessor, std::string *err, const json &o) {
if (componentType >= TINYGLTF_COMPONENT_TYPE_BYTE &&
componentType <= TINYGLTF_COMPONENT_TYPE_DOUBLE) {
// OK
accessor->componentType = componentType;
accessor->componentType = int(componentType);
} else {
std::stringstream ss;
ss << "Invalid `componentType` in accessor. Got " << componentType