From 6d27dbaab3b32ccebb076895fac3cc6aa3240d6c Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Sat, 24 Apr 2021 16:42:52 -0400 Subject: Fix most -Wall warnings (#115) * started on basic type errors * Done. For now * remove libgfxd binary * Most warnings fixed * Fix conflicts and new warnings * Makefile * Sig * Clang format * destructor * Add a bunch of destructors * clear the scalars vector after freeing the elements * PR fixes (Anghelo Alf) * Fix most clang -Wall warnings --- ZAPD/ZAnimation.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ZAPD/ZAnimation.cpp') diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp index 81f769c..346e5d8 100644 --- a/ZAPD/ZAnimation.cpp +++ b/ZAPD/ZAnimation.cpp @@ -76,8 +76,8 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix) string indicesStr = ""; string valuesStr = " "; - const int lineLength = 14; - const int offset = 0; + const uint8_t lineLength = 14; + const uint8_t offset = 0; for (size_t i = 0; i < rotationValues.size(); i++) { @@ -98,12 +98,12 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix) } parent->AddDeclarationArray(rotationValuesSeg, DeclarationAlignment::Align16, - (int)rotationValues.size() * 2, "static s16", + rotationValues.size() * 2, "static s16", StringHelper::Sprintf("%sFrameData", defaultPrefix.c_str()), rotationValues.size(), valuesStr); parent->AddDeclarationArray(rotationIndicesSeg, DeclarationAlignment::Align16, - (int)rotationIndices.size() * 6, "static JointIndex", + rotationIndices.size() * 6, "static JointIndex", StringHelper::Sprintf("%sJointIndices", defaultPrefix.c_str()), rotationIndices.size(), indicesStr); } @@ -111,7 +111,7 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix) return ""; } -int ZNormalAnimation::GetRawDataSize() +size_t ZNormalAnimation::GetRawDataSize() { return 16; } @@ -122,7 +122,7 @@ std::string ZNormalAnimation::GetSourceTypeName() } void ZNormalAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, - const std::vector& nRawData, const int nRawDataIndex, + const std::vector& nRawData, const uint32_t nRawDataIndex, const std::string& nRelPath) { rawData = std::move(nRawData); @@ -185,7 +185,7 @@ std::string ZLinkAnimation::GetSourceOutputCode(const std::string& prefix) return ""; } -int ZLinkAnimation::GetRawDataSize() +size_t ZLinkAnimation::GetRawDataSize() { return 8; } @@ -196,7 +196,7 @@ std::string ZLinkAnimation::GetSourceTypeName() } void ZLinkAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, - const std::vector& nRawData, const int nRawDataIndex, + const std::vector& nRawData, const uint32_t nRawDataIndex, const std::string& nRelPath) { rawData = std::move(nRawData); @@ -284,7 +284,7 @@ void ZCurveAnimation::ParseRawData() } void ZCurveAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, - const std::vector& nRawData, const int nRawDataIndex, + const std::vector& nRawData, const uint32_t nRawDataIndex, const std::string& nRelPath) { ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); @@ -425,7 +425,7 @@ void ZCurveAnimation::PreGenValues(const std::string& prefix) } } -int ZCurveAnimation::GetRawDataSize() +size_t ZCurveAnimation::GetRawDataSize() { return 0x10; } -- cgit v1.2.3