Fix clang-tidy performance warnings in update_engine.
* Use const reference type for parameters, local variables,
and for-loop index variables to avoid unnecessary copy.
* Convert some for-loops to for-rang loops.
Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I78996b3f799639fc57ced45e110807625be7dcce
Test: build with WITH_TIDY=1
diff --git a/payload_generator/fake_filesystem.h b/payload_generator/fake_filesystem.h
index a14b8d3..1b13920 100644
--- a/payload_generator/fake_filesystem.h
+++ b/payload_generator/fake_filesystem.h
@@ -43,7 +43,7 @@
// Fake methods.
// Add a file to the list of fake files.
- void AddFile(const std::string& filename, const std::vector<Extent> extents);
+ void AddFile(const std::string& filename, const std::vector<Extent>& extents);
// Sets the PAYLOAD_MINOR_VERSION key stored by LoadSettings(). Use a negative
// value to produce an error in LoadSettings().