tidy: fix performance-inefficient-string-concatenation
Tested by building and running the unit tests.
Change-Id: Ia7638172abcd737d6036bb5b2b96d03fb0a85562
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/src/path.hpp b/src/path.hpp
new file mode 100644
index 0000000..f3bd2ce
--- /dev/null
+++ b/src/path.hpp
@@ -0,0 +1,10 @@
+#include <string>
+
+inline std::string appendPathSegment(const std::string& target,
+ const std::string& segment)
+{
+ std::string newPath;
+ newPath.reserve(target.size() + 1 + segment.size());
+ newPath.append(target).append("/").append(segment);
+ return newPath;
+}