From 84caa3d68c3015405d79da3a8fe6fb7d13cacd1e Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sun, 13 Feb 2022 21:08:20 -0800 Subject: [PATCH] avoid duplicate names in scope Flagged by `-Wshadow`. ``` cbSet::const_iterator it std::vector >::const_iterator it ``` two iterators with the same name in nearby scopes makes it a bit harder to decide which is which. Simply renamed the first one for clarity. --- src/callback_registry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/callback_registry.cpp b/src/callback_registry.cpp index d527fe53..a383539f 100644 --- a/src/callback_registry.cpp +++ b/src/callback_registry.cpp @@ -338,8 +338,8 @@ bool CallbackRegistry::empty() const { bool CallbackRegistry::due(const Timestamp& time, bool recursive) const { ASSERT_MAIN_THREAD() Guard guard(mutex); - cbSet::const_iterator it = queue.begin(); - if (!this->queue.empty() && !((*it)->when > time)) { + cbSet::const_iterator cbSet_it = queue.begin(); + if (!this->queue.empty() && !((*cbSet_it)->when > time)) { return true; }