Closed Bug 763873 Opened 14 years ago Closed 14 years ago

avoid repeatedly accessing aRanges.Length() within ComputeRanges

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

A little micro-optimization.... it's potentially inefficient to constantly read aRanges.Length(); instead, we can keep track of the last range index in a local variable. We also don't need the initial Clear(), as ComputeRanges is always called with a freshly-constructed array.
Attachment #632192 - Attachment is patch: true
Attachment #632192 - Flags: review?(jdaggett)
Attachment #632192 - Flags: review?(jdaggett) → review+
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla16
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: