Closed
Bug 1436643
Opened 6 years ago
Closed 6 years ago
Use a PLDHashTable `initEntry` function for Pref.
Categories
(Core :: Preferences: Backend, enhancement)
Core
Preferences: Backend
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(1 file)
A small improvement.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8949276 [details] Bug 1436643 - Use a PLDHashTable `initEntry` function for Pref. https://reviewboard.mozilla.org/r/218644/#review224810 Thanks, proper initialization is always nice. ::: modules/libpref/Preferences.cpp:365 (Diff revision 1) > + auto pref = static_cast<Pref*>(aEntry); > + auto prefName = static_cast<const char*>(aKey); We don't have anything in the style guide about this, but I find `auto*` slightly nicer for cases like this. WDYT? (I guess it's not local style, either...)
Attachment #8949276 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•6 years ago
|
||
> > + auto prefName = static_cast<const char*>(aKey);
>
> We don't have anything in the style guide about this, but I find `auto*`
> slightly nicer for cases like this. WDYT?
My opinion is that the type is present on the RHS, so there is no point duplicating any part of it on the LHS.
Assignee | ||
Comment 4•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5cd9cebf800b3b941731c608d89b71ce1897f6a0 Bug 1436643 - Use a PLDHashTable `initEntry` function for Pref. r=froydnj
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5cd9cebf800b
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.
Description
•