summaryrefslogtreecommitdiff
path: root/ZAPD/ZPath.cpp
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2021-10-11 14:05:18 -0400
committerGitHub <noreply@github.com>2021-10-11 14:05:18 -0400
commit1c687a69c1f6b84a3fea1bcab8e141f8a26e16dc (patch)
treeaef5f75cefb24ad9d77a7c69776b6df6eba004b5 /ZAPD/ZPath.cpp
parent4994e732406ffa2942f9c9ea6ff14c424cd0b896 (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/ZPath.cpp')
-rw-r--r--ZAPD/ZPath.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ZAPD/ZPath.cpp b/ZAPD/ZPath.cpp
index 7311a4a..d834076 100644
--- a/ZAPD/ZPath.cpp
+++ b/ZAPD/ZPath.cpp
@@ -69,7 +69,7 @@ Declaration* ZPath::DeclareVar(const std::string& prefix, const std::string& bod
std::string ZPath::GetBodySourceCode() const
{
- std::string declaration = "";
+ std::string declaration;
size_t index = 0;
for (const auto& entry : pathways)
@@ -138,9 +138,9 @@ void PathwayEntry::DeclareReferences(const std::string& prefix)
if (points.empty())
return;
- std::string pointsName = "";
+ std::string pointsName;
- std::string declaration = "";
+ std::string declaration;
size_t index = 0;
for (const auto& point : points)
@@ -162,7 +162,7 @@ void PathwayEntry::DeclareReferences(const std::string& prefix)
std::string PathwayEntry::GetBodySourceCode() const
{
- std::string declaration = "";
+ std::string declaration;
std::string listName = parent->GetDeclarationPtrName(listSegmentAddress);
if (Globals::Instance->game == ZGame::MM_RETAIL)