Closed Bug 678069 Opened 8 years ago Closed 8 years ago

Fix c++0x initializer list error found by clang

Categories

(Core :: Widget: Cocoa, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: espindola, Assigned: espindola)

Details

Attachments

(1 file)

Attached patch fix buildSplinter Review
Fix build with clang and c++0x. mShWidth and mShHeight are used in an initializer list for NPRect in fields that have time uint16_t. Change their definitions to match.
Attachment #552231 - Flags: review?(mh+mozilla)
Attachment #552231 - Flags: review?(mh+mozilla) → review?(joshmoz)
Comment on attachment 552231 [details] [diff] [review]
fix build

mShWidth and mShHeight are also used for "CGBitmapContextCreate", which wants size_t, and "CGRectMake", which wants CGFloat. Is the logic here to make the stored value the smallest of all the requirements?
Almost. It is one that will not lose a value when going to uint16_t in a initializer list (which is the c++0x restriction).
Attachment #552231 - Flags: review?(joshmoz) → review+
http://hg.mozilla.org/mozilla-central/rev/9d083bbd47f5
Assignee: nobody → respindola
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.