From 83ccb9f28dab56ebe1eee79dd65df6c2ba6cfbe4 Mon Sep 17 00:00:00 2001 From: DingboDingboDingbo <51836582+DingboDingboDingbo@users.noreply.github.com> Date: Thu, 29 Aug 2019 18:49:15 -0400 Subject: [PATCH] GetTypeSizeInBytes not returning Type Size In Bytes Changed name to be less misleading. --- tiny_gltf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 62c466d..27de815 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -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(type)); + int typeSizeInBytes = GetNumComponentsInType(static_cast(type)); if (typeSizeInBytes <= 0) { return -1; }