Closed Bug 806002 Opened 13 years ago Closed 13 years ago

Make nsDidReflowStatus into an enum

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

No description provided.
Right now, the nsDidReflowStatus type is defined as follows: > 508 /** > 509 * DidReflow status values. > 510 */ > 511 typedef bool nsDidReflowStatus; > 512 > 513 #define NS_FRAME_REFLOW_NOT_FINISHED false > 514 #define NS_FRAME_REFLOW_FINISHED true http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsIFrame.h#508 We should convert it into an enum instead of a typedef, so compilers can enforce that we're using it correctly and not accidentally passing in a different type. (to prevent bugs like bug 806001)
Depends on: 806001
Attached patch fixSplinter Review
This patch currently breaks the build due to bug 806001 (yay, we can catch bugs!) but it builds successfully after that bug is fixed.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #675720 - Flags: review?(dbaron)
Flags: in-testsuite-
Hmm, I wish you had made it an enum class. :-)
I haven't dug into C++11 stuff too much yet, so I don't exactly know the distinction -- but FWIW, just making it an enum did catch some bugs (via compile errors), as noted in comment 2! But if you think it'd help, feel free to file followup on making it an enum class if you like!
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Filed bug 810355.
Blocks: 810355
OS: Linux → All
Hardware: x86_64 → All
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: