From 66e447d2c9f37956e4f861b9ca7c911a8bc84004 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Fri, 23 Feb 2024 09:18:32 -0500 Subject: [PATCH] Fix review comments --- cpp/src/slice2cpp/Gen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 64420865ee9..2059361de90 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3213,7 +3213,7 @@ Slice::Gen::InterfaceVisitor::visitInterfaceDefStart(const InterfaceDefPtr& p) // These type IDs are sorted alphabetically. C << nl << "static const ::std::vector<::std::string> allTypeIds = "; C.spar("{ "); - for (auto typeId : p->ids()) + for (const auto& typeId : p->ids()) { C << '"' + typeId + '"'; } @@ -3280,7 +3280,7 @@ Slice::Gen::InterfaceVisitor::visitInterfaceDefEnd(const InterfaceDefPtr& p) C << sp; C << nl << "static constexpr ::std::string_view allOperations[] = "; C.spar("{ "); - for (auto opName : allOpNames) + for (const auto& opName : allOpNames) { C << '"' + opName + '"'; }