Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I68f2d0791211300b6b0058926e742371c0bc1295
diff --git a/IPCThreadState.cpp b/IPCThreadState.cpp
index d97ad12..c7c71be 100644
--- a/IPCThreadState.cpp
+++ b/IPCThreadState.cpp
@@ -473,7 +473,7 @@
// call and that other process calls back into us
std::vector<std::function<void(void)>> tasks = mPostCommandTasks;
mPostCommandTasks.clear();
- for (auto func : tasks) {
+ for (const auto& func : tasks) {
func();
}
}