Utils: Use consistent style in expression reconstruction
Also avoid generation of intermediate strings where possible.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I42c5443d58cbc872a61e29b24581be118e3f02b5
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 3d56946..308b082 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -306,15 +306,13 @@
std::string replaced(find.begin(), find.end());
while (exprBegin != exprEnd)
{
- replaced += " ";
- replaced += *exprBegin++;
+ replaced.append(" ").append(*exprBegin++);
}
-
ret = replaced;
while (exprEnd != split.end())
{
- result += " " + *exprEnd++;
+ result.append(" ").append(*exprEnd++);
}
keyPair.value() = result;