Last Comment Bug 752604 - Ergonomics improvements for HashTable::rekeyFront
: Ergonomics improvements for HashTable::rekeyFront
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Terrence Cole [:terrence]
:
:
Mentors:
Depends on:
Blocks: 744270
  Show dependency treegraph
 
Reported: 2012-05-07 11:17 PDT by Terrence Cole [:terrence]
Modified: 2012-05-08 03:13 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v0 (1.29 KB, patch)
2012-05-07 11:17 PDT, Terrence Cole [:terrence]
luke: review+
Details | Diff | Splinter Review

Description Terrence Cole [:terrence] 2012-05-07 11:17:28 PDT
Created attachment 621675 [details] [diff] [review]
v0

This makes rekeyFront take a const ref and check for the unchanged case.  This allows us to unconditionally pass a newly constructed temporary into it.  This saves us a few lines and a level of indentation basically everywhere we need to use rekeyFront.  Granted, this is only a handful of places, but this still seems to be the cleaner option.
Comment 1 Terrence Cole [:terrence] 2012-05-07 12:48:32 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b11e6c758c8
Comment 2 Ed Morley [:emorley] 2012-05-08 03:13:43 PDT
https://hg.mozilla.org/mozilla-central/rev/7b11e6c758c8

Note You need to log in before you can comment on or make changes to this bug.