From ce97d79fa32b97ce8ee0f1c9d107d032c0140a0d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 18 Jun 2020 04:30:54 -0400 Subject: [PATCH] CBoneTransformData: Make use of size_t where applicable Plays nicer with standard containers and prevents truncation warnings. --- src/Core/Render/CBoneTransformData.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Core/Render/CBoneTransformData.h b/src/Core/Render/CBoneTransformData.h index 163f9826..1d64bafe 100644 --- a/src/Core/Render/CBoneTransformData.h +++ b/src/Core/Render/CBoneTransformData.h @@ -14,13 +14,13 @@ public: CBoneTransformData() = default; explicit CBoneTransformData(CSkeleton *pSkel) { ResizeToSkeleton(pSkel); } void ResizeToSkeleton(CSkeleton *pSkel) { mBoneMatrices.resize(pSkel ? pSkel->MaxBoneID() + 1 : 0); } - CTransform4f& BoneMatrix(uint32 BoneID) { return mBoneMatrices[BoneID]; } - const CTransform4f& BoneMatrix(uint32 BoneID) const { return mBoneMatrices[BoneID]; } + CTransform4f& BoneMatrix(size_t BoneID) { return mBoneMatrices[BoneID]; } + const CTransform4f& BoneMatrix(size_t BoneID) const { return mBoneMatrices[BoneID]; } const void* Data() const { return mBoneMatrices.data(); } - uint32 DataSize() const { return mBoneMatrices.size() * sizeof(CTransform4f); } - uint32 NumTrackedBones() const { return mBoneMatrices.size(); } - CTransform4f& operator[](uint32 BoneIndex) { return BoneMatrix(BoneIndex); } - const CTransform4f& operator[](uint32 BoneIndex) const { return BoneMatrix(BoneIndex); } + size_t DataSize() const { return mBoneMatrices.size() * sizeof(CTransform4f); } + size_t NumTrackedBones() const { return mBoneMatrices.size(); } + CTransform4f& operator[](size_t BoneIndex) { return BoneMatrix(BoneIndex); } + const CTransform4f& operator[](size_t BoneIndex) const { return BoneMatrix(BoneIndex); } }; #endif // CBONETRANSFORMDATA