Closed Bug 1186112 Opened 9 years ago Closed 9 years ago

Get rid of the #define'd constants in BMPFileHeaders.h

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file, 1 obsolete file)

BMPFileHeaders.h is an obstacle to both refactoring and unified compilation in ImageLib because it defines constants with the same names as constants defined in windows.h. Rather than continuing to fight this issue with careful include order and separate compilation, let's just get rid of those #define's once and for all.

In this bug I'll replace the #define's with a combination of static constants and struct-wrapped enums. (I can't use |enum class| for these constants because we do math with them and assign them to integer variables.)
Here's the patch. Outside of BMPFileHeaders.h this is entirely search and
replace, with a pass over the resulting diff to make sure everything looks right
and fix formatting.
Attachment #8636695 - Flags: review?(tnikkel)
Needed to rename one more constant. Tricksy #define's...
Attachment #8636758 - Flags: review?(tnikkel)
Attachment #8636695 - Attachment is obsolete: true
Attachment #8636695 - Flags: review?(tnikkel)
OK, try looks good.
Attachment #8636758 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/a06de7923088
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: