Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Feb 23, 2024
1 parent 5f9950d commit 66e447d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/slice2cpp/Gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '"';
}
Expand Down Expand Up @@ -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 + '"';
}
Expand Down

0 comments on commit 66e447d

Please sign in to comment.