GetTypeSizeInBytes not returning Type Size In Bytes

Changed name to be less misleading.
This commit is contained in:
DingboDingboDingbo 2019-08-29 18:49:15 -04:00 committed by GitHub
parent ff51570c26
commit 83ccb9f28d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,7 @@ static inline int32_t GetComponentSizeInBytes(uint32_t componentType) {
}
}
static inline int32_t GetTypeSizeInBytes(uint32_t ty) {
static inline int32_t GetNumComponentsInType(uint32_t ty) {
if (ty == TINYGLTF_TYPE_SCALAR) {
return 1;
} else if (ty == TINYGLTF_TYPE_VEC2) {
@ -745,7 +745,7 @@ struct Accessor {
return -1;
}
int typeSizeInBytes = GetTypeSizeInBytes(static_cast<uint32_t>(type));
int typeSizeInBytes = GetNumComponentsInType(static_cast<uint32_t>(type));
if (typeSizeInBytes <= 0) {
return -1;
}