From 9f246298e2f0af3973918a0dac0c5f46bc0993c0 Mon Sep 17 00:00:00 2001 From: Changli Gao Date: Wed, 11 Jan 2017 10:38:07 -0800 Subject: [PATCH] Performance: Iterate vector by reference Summary: Closes https://github.com/facebook/rocksdb/pull/1763 Differential Revision: D4398796 Pulled By: yiwu-arbug fbshipit-source-id: b82636d --- db/event_helpers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/event_helpers.cc b/db/event_helpers.cc index 9249837c2b..5e5d23130a 100644 --- a/db/event_helpers.cc +++ b/db/event_helpers.cc @@ -128,7 +128,7 @@ void EventHelpers::LogAndNotifyTableFileDeletion( info.job_id = job_id; info.file_path = file_path; info.status = status; - for (auto listener : listeners) { + for (auto& listener : listeners) { listener->OnTableFileDeleted(info); } #endif // !ROCKSDB_LITE