From ae8ac528da1797b740a6fd4a223855cec6106b21 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 2 Aug 2019 13:32:55 -0700 Subject: [PATCH] mds: use auto to deduce iterator type This prevents accidental type mismatches. Signed-off-by: Patrick Donnelly --- src/mds/SessionMap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index 0c3bcc5c6d5..2e30433436b 100644 --- a/src/mds/SessionMap.h +++ b/src/mds/SessionMap.h @@ -606,8 +606,8 @@ public: } bool is_any_state(int state) const { - map* >::const_iterator p = by_state.find(state); - if (p == by_state.end() || p->second->empty()) + auto it = by_state.find(state); + if (it == by_state.end() || it->second->empty()) return false; return true; } -- 2.39.5