From d72d28a0a5a631393a094e83cdf653cce6176a6b Mon Sep 17 00:00:00 2001 From: alesapin Date: Mon, 24 May 2021 18:52:48 +0300 Subject: [PATCH] Fix clang tidy --- src/Coordination/KeeperStorage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index 968fb14ea1e..20f8c95c6c1 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -69,15 +69,15 @@ static bool checkACL(int32_t permission, const Coordination::ACLs & node_acls, c if (session_auth.scheme == "super") return true; - for (size_t i = 0; i < node_acls.size(); ++i) + for (const auto & node_acl : node_acls) { - if (node_acls[i].permissions & permission) + if (node_acl.permissions & permission) { - if (node_acls[i].scheme == "world" && node_acls[i].id == "anyone") + if (node_acl.scheme == "world" && node_acl.id == "anyone") return true; - for (size_t j = 0; j < session_auths.size(); ++j) - if (node_acls[i].scheme == session_auths[j].scheme && node_acls[i].id == session_auths[j].id) + for (const auto & session_auth : session_auths) + if (node_acl.scheme == session_auth.scheme && node_acl.id == session_auth.id) return true; } }