Closed Bug 1208945 Opened 9 years ago Closed 9 years ago

Rename Color::{To,From}ARGB() so they aren't easily confused with {To,From}ABGR()

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

(Spun off from bug 1208283.)

Color::{To,From}ARGB() are really similar names to Color::{To,From}ABGR().
While refactoring I was scared I would type the wrong one. So I suggest giving
the latter pair, which are uncommon, a different name.
Maybe "RarelyUsed" instead of uncommon? Or perhaps better, mention that this is to do with endianness with something like {To,From}ABGRForBigEndian(). If the appropriate endianness defines were available it might even be better to ifdef out these functions for little endian platforms.
As long as the name is significantly different to {To,From}ARGB() I don't mind what it is. I'm happy to let Bas bikeshed it in his review.
Attachment #8666580 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/feda11b57723
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: