Closed Bug 1233234 Opened 8 years ago Closed 8 years ago

use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in modules/libpref/

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(3 files)

      No description provided.
Returning outparams with UniquePtr is not convenient or idiomatic, so in
addition to removing nsAutoArrayPtr usage, let's return a UniquePtr from
the function directly.
Attachment #8699209 - Flags: review?(n.nethercote)
We shouldn't use .get() on UniquePtr<T[]> unless we have to, and it
makes the code clearer to not use pointer incrementing in any event.
Attachment #8699210 - Flags: review?(n.nethercote)
Attachment #8699207 - Flags: review?(n.nethercote) → review+
Attachment #8699209 - Flags: review?(n.nethercote) → review+
Comment on attachment 8699210 [details] [diff] [review]
part 3 - clean up UniquePtr usage in WritePrefFile

Review of attachment 8699210 [details] [diff] [review]:
-----------------------------------------------------------------

Much nicer.
Attachment #8699210 - Flags: review?(n.nethercote) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: