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

RESOLVED FIXED in mozilla8

Status

()

Core
Widget: Cocoa
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

Trunk
mozilla8
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 552231 [details] [diff] [review]
fix build

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 1

6 years ago
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).

Updated

6 years ago
Attachment #552231 - Flags: review?(joshmoz) → review+
http://hg.mozilla.org/mozilla-central/rev/9d083bbd47f5
Assignee: nobody → respindola
Status: NEW → RESOLVED
Last Resolved: 6 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.