Closed Bug 1435372 Opened 6 years ago Closed 6 years ago

MilestoneEntry pass constructor argument by const reference

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: jeanluc.bonnafoux, Assigned: longsonr)

Details

Attachments

(1 file)

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
Attached patch patchSplinter Review
Assignee: nobody → longsonr
Attachment #8948074 - Flags: review?(bbirtles)
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
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
https://hg.mozilla.org/mozilla-central/rev/803bb3cae552
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: