clang-tidy: Enable performance-for-range-copy check
This check optimizes performance in C++ for range-based loops
(for (auto element : container)), the key consideration is to
avoid unnecessary copies of elements, especially when dealing with
larger or more complex objects.
Change-Id: I3349630950f72e1c0365b2ab23b7858c1bfbc9d4
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/test/utest.cpp b/test/utest.cpp
index 831d9b3..8e3edd3 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -408,7 +408,7 @@
TEST_F(FileTest, TestMergeFiles)
{
std::string retFile = tmpDir + "/retFile";
- for (auto file : srcFiles)
+ for (const auto& file : srcFiles)
{
command("cat " + file + " >> " + retFile);
}