diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2021-10-11 14:05:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 14:05:18 -0400 |
| commit | 1c687a69c1f6b84a3fea1bcab8e141f8a26e16dc (patch) | |
| tree | aef5f75cefb24ad9d77a7c69776b6df6eba004b5 /ZAPD/ZAnimation.cpp | |
| parent | 4994e732406ffa2942f9c9ea6ff14c424cd0b896 (diff) | |
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)
Diffstat (limited to 'ZAPD/ZAnimation.cpp')
| -rw-r--r-- | ZAPD/ZAnimation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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++) { |
