Skip to content

Commit 24e435c

Browse files
committed
use old for each syntax
1 parent 2686d14 commit 24e435c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/viam/sdk/components/private/arm_client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ std::map<std::string, mesh> ArmClient::get_3d_models(const ProtoStruct& extra) {
111111
.with(extra)
112112
.invoke([](auto& response) {
113113
std::map<std::string, mesh> models;
114-
for (const auto& [key, value] : response.models()) {
115-
models.emplace(key, from_proto(value));
114+
for (const auto& entry : response.models()) {
115+
models.emplace(entry.first, from_proto(entry.second));
116116
}
117117
return models;
118118
});

src/viam/sdk/components/private/arm_server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ ::grpc::Status ArmServer::Get3DModels(::grpc::ServerContext*,
142142
"ArmServer::Get3DModels", this, request)([&](auto& helper, auto& arm) {
143143
const std::map<std::string, mesh> models = arm->get_3d_models(helper.getExtra());
144144

145-
for (const auto& [key, mesh] : models) {
146-
response->mutable_models()->insert({key, to_proto(mesh)});
145+
for (const auto& entry : models) {
146+
response->mutable_models()->insert({entry.first, to_proto(entry.second)});
147147
}
148148
});
149149
}

0 commit comments

Comments
 (0)