Closed Bug 1205733 Opened 9 years ago Closed 9 years ago

Add move overloads to dom::Nullable's constructor and SetValue method

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Right now the constructor and SetValue method for dom::Nullable take the type parameter by value, and then pass it to the copy constructor through emplace.

This new code enables the data inside dom::Nullable to be constructed using a move constructor or a copy constructor, without any additional copies, by instead passing either a const T& or T&& as two overloads.
Attachment #8662468 - Flags: review?(bugs)
Assignee: nobody → michael
Attachment #8662468 - Flags: review?(bugs) → review?(bzbarsky)
Comment on attachment 8662468 [details] [diff] [review]
Add move overloads to dom::Nullable's constructor and SetValue method

r=me
Attachment #8662468 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/64821648efdd
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: