Closed Bug 791953 Opened 12 years ago Closed 12 years ago

gfxFont.h(2080) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data

Categories

(Core :: Graphics: Text, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

When I build debug build on Win7 with VC2010, I can see this warning for a long while:

> gfxFont.h(2080) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data

http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxFont.h#2079

Looks like the 1.0 and -1.0 should be 1.0f and -1.0f. Or the result type should be integer.
Attached patch PatchSplinter Review
The only user of the method is here:
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxUniscribeShaper.cpp#289

I think that the result type should be kept as float.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #662381 - Flags: review?(jfkthame)
Comment on attachment 662381 [details] [diff] [review]
Patch

Review of attachment 662381 [details] [diff] [review]:
-----------------------------------------------------------------

Fine, thanks. (What a silly warning - the compiler can see it's a constant and won't lose anything...)
Attachment #662381 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6727fcb41025

Yeah, it's odd... But anyway, thank you for your review.
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/6727fcb41025
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: