From 1c687a69c1f6b84a3fea1bcab8e141f8a26e16dc Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Mon, 11 Oct 2021 14:05:18 -0400 Subject: string -> const string& and more (#199) * all possible strings use const & and make some strings const char* * remove ='' from new strings * formatter * revert globals * Fix warning (error) --- ZAPD/ZAnimation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ZAPD/ZAnimation.cpp') diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp index ed9a58f..db72f2e 100644 --- a/ZAPD/ZAnimation.cpp +++ b/ZAPD/ZAnimation.cpp @@ -58,7 +58,7 @@ std::string ZNormalAnimation::GetSourceOutputCode([[maybe_unused]] const std::st StringHelper::Sprintf("%s", name.c_str()), headerStr); decl->staticConf = staticConf; - std::string indicesStr = ""; + std::string indicesStr; std::string valuesStr = " "; const uint8_t lineLength = 14; const uint8_t offset = 0; @@ -323,7 +323,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix) "%sCurveAnime_%s_%06X", prefix.c_str(), transformDataArr.at(0).GetSourceTypeName().c_str(), transformDataOffset); - std::string entryStr = ""; + std::string entryStr; uint16_t arrayItemCnt = transformDataArr.size(); size_t i = 0; @@ -383,7 +383,7 @@ size_t ZCurveAnimation::GetRawDataSize() const std::string ZCurveAnimation::GetSourceOutputCode(const std::string& prefix) { - std::string bodyStr = ""; + std::string bodyStr; uint32_t address = Seg2Filespace(rawDataIndex, parent->baseAddress); std::string refIndexStr = "NULL"; @@ -534,7 +534,7 @@ void ZLegacyAnimation::DeclareReferences(const std::string& prefix) if (GETSEGNUM(jointKey) == parent->segment && !parent->HasDeclaration(jointKeyOffset)) { const auto res = jointKeyArray.at(0); - std::string jointKeyBody = ""; + std::string jointKeyBody; for (size_t i = 0; i < jointKeyArray.size(); i++) { -- cgit v1.2.3