Skip to content

Commit 5a5f9bf

Browse files
hexbabelia-viam
andcommitted
Update src/viam/sdk/components/private/camera_client.cpp
Co-authored-by: lia <[email protected]>
1 parent 845ff3b commit 5a5f9bf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Camera::image_collection from_proto(const viam::component::camera::v1::GetImages
5656
raw_image.bytes = bytes;
5757
// TODO(RSDK-11733): This is a temporary fix to support handling both the format and mime
5858
// type. We will remove this once we remove the format field from the proto.
59-
// We will remove this once we remove the format field from the proto.
6059
if (!img.mime_type().empty()) {
6160
raw_image.mime_type = img.mime_type();
6261
} else {
@@ -135,10 +134,9 @@ Camera::image_collection CameraClient::get_images(std::vector<std::string> filte
135134
.with(extra,
136135
[&](auto& request) {
137136
if (!filter_source_names.empty()) {
138-
request.mutable_filter_source_names()->Reserve(filter_source_names.size());
139-
for (auto& source_name : filter_source_names) {
140-
request.add_filter_source_names(std::move(source_name));
141-
}
137+
request.mutable_filter_source_names()->Add(
138+
std::make_move_iterator(filter_source_names.begin()),
139+
std::make_move_iterator(filter_source_names.end()));
142140
}
143141
})
144142
.invoke([](auto& response) { return from_proto(response); });

0 commit comments

Comments
 (0)