Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d2dce59

Browse filesBrowse files
tniessenruyadorno
authored andcommitted
src: avoid copying BaseObjectPtrs in loop
While copying BaseObjectPtrs is cheap, it is not a no-op, so it is best to iterate over references to BaseObjectPtrs only. PR-URL: #44270 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a3ac445 commit d2dce59
Copy full SHA for d2dce59

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/node_messaging.cc‎

Copy file name to clipboardExpand all lines: src/node_messaging.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class SerializerDelegate : public ValueSerializer::Delegate {
349349
std::vector<BaseObjectPtr<BaseObject>> nested_transferables;
350350
if (!host_objects_[i]->NestedTransferables().To(&nested_transferables))
351351
return Nothing<bool>();
352-
for (auto nested_transferable : nested_transferables) {
352+
for (auto& nested_transferable : nested_transferables) {
353353
if (std::find(host_objects_.begin(),
354354
host_objects_.end(),
355355
nested_transferable) == host_objects_.end()) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.