Closed
Bug 1664122
Opened 5 years ago
Closed 5 years ago
Improve MarkerOptions accessors
Categories
(Core :: Gecko Profiler, task, P3)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
82 Branch
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
MarkerOptions::Set()
works on any non-const object, and always returns an rvalue reference, it doesn't feel right! Instead we should have the same reference type as input and output.
MarkerOptions::NAME()
returns a reference to member on both const
and non-const
objects, I think it'd be better to reserve NAME()
to get a const
reference, and have an explicit NAMERef()
when non-const
access is needed.
Assignee | ||
Comment 1•5 years ago
|
||
MarkerOptions::Set()
returns the same reference type as the object it's invoked on, i.e.: & -> &, and && -> &&.
MarkerOptions::NAME()
always returns a reference to a const
member, so it's clear it cannot be modified (even if the object at hand is not const
).
MarkerOptions::NAMERef()
can now be used when non-const
access is needed.
Depends on D89588
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e381cc96a788
Clearer MarkerOptions accessors - r=gregtatum
Comment 3•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox82:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•