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

RESOLVED FIXED in Firefox 42

Status

()

Core
ImageLib
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: seth, Assigned: seth)

Tracking

unspecified
mozilla42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
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.)
(Assignee)

Comment 1

3 years ago
Created attachment 8636695 [details] [diff] [review]
Get rid of the #define'd constants in BMPFileHeaders.h

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)
(Assignee)

Comment 3

3 years ago
Created attachment 8636758 [details] [diff] [review]
Get rid of the #define'd constants in BMPFileHeaders.h

Needed to rename one more constant. Tricksy #define's...
Attachment #8636758 - Flags: review?(tnikkel)
(Assignee)

Updated

3 years ago
Attachment #8636695 - Attachment is obsolete: true
Attachment #8636695 - Flags: review?(tnikkel)
(Assignee)

Comment 5

3 years ago
OK, try looks good.
Attachment #8636758 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/a06de7923088
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.