MilestoneEntry pass constructor argument by const reference

RESOLVED FIXED in Firefox 60

Status

()

defect
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jeanluc.bonnafoux, Assigned: longsonr)

Tracking

Trunk
mozilla60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180128191252

Steps to reproduce:

Static code analysis (cppcheck v1.82) points out that constructor of class MilestoneEntry should have its first argument (type: nsSMILMilestone) passed by const reference.


Actual results:

Current code works but some unnecessary object copy may happen.


Expected results:

passing argument by const reference would avoid unnecessary object copy.
Component: DOM → SVG
(Assignee)

Comment 1

a year ago
Posted patch patchSplinter Review
Assignee: nobody → longsonr
Attachment #8948074 - Flags: review?(bbirtles)
(Assignee)

Updated

a year ago
Attachment #8948074 - Attachment is patch: true
Comment on attachment 8948074 [details] [diff] [review]
patch

Review of attachment 8948074 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this.
Attachment #8948074 - Flags: review?(bbirtles) → review+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Comment 4

a year ago
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/803bb3cae552
pass nsSMILMilestone into the constructor of MilestoneEntry by const reference to avoid an unnecessary object copy r=birtles

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/803bb3cae552
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.