OSDN Git Service

Fix clang-tidy performance warnings in syste/core.
[android-x86/system-core.git] / init / service.cpp
index 3149f8e..76e0bc8 100644 (file)
@@ -729,7 +729,7 @@ Service* ServiceManager::FindServiceByKeychord(int keychord_id) const {
     return nullptr;
 }
 
-void ServiceManager::ForEachService(std::function<void(Service*)> callback) const {
+void ServiceManager::ForEachService(const std::function<void(Service*)>& callback) const {
     for (const auto& s : services_) {
         callback(s.get());
     }