Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Add double overload to NSToIntRound to stop build warnings

RESOLVED FIXED in mozilla8

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

(Blocks: 1 bug)

Trunk
mozilla8
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
+++ This bug was initially created as a clone of Bug #670111 +++

Bug 447838 is trying to stop the build warnings in nsTextFrameThebes.cpp, many of which are along the lines of:
> warning C4244: 'argument' : conversion from 'gfxFloat' to 'float', possible loss of data

To save clarity reducing changes like:
-          TabWidth(i - startOffset, nextTab - mOffsetFromBlockOriginForTabs));
+          TabWidth(i - startOffset, 
+                   NSToIntRound(float(nextTab - mOffsetFromBlockOriginForTabs))));

Roc suggested that I add a double overload to NSToIntRound.

Hopefully this will reduce the number of build warnings in files other than nsTextFrameThebes.cpp as well.
(Assignee)

Comment 1

6 years ago
Created attachment 544978 [details] [diff] [review]
Patch v1

Double overload for NSToIntRound, broken out from bug 447838.

Was going to include this in bug 670111 along with the NSToCoord* changes, but that's already reviewed and checkin-needed, so thought it would just be easier to deal with separately.
Attachment #544978 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Whiteboard: [build_warning]
(Assignee)

Comment 2

6 years ago
http://dev.philringnalda.com/tbpl/?tree=Try&rev=24df92bc84bb
(Assignee)

Updated

6 years ago
Blocks: 670461
Comment on attachment 544978 [details] [diff] [review]
Patch v1

Review of attachment 544978 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #544978 - Flags: review?(roc) → review+
(Assignee)

Comment 4

6 years ago
Passed try (comment 2).
Keywords: checkin-needed

Comment 5

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/ed3036facfb2
Flags: in-testsuite-
Keywords: checkin-needed
Merged:
http://hg.mozilla.org/mozilla-central/rev/ed3036facfb2
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Depends on: 629196
I've backed this out from inbound to see if it affects the frequency of bug 629196: <http://hg.mozilla.org/integration/mozilla-inbound/rev/af960bd72863>
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
And this backout was merged to m-c: http://hg.mozilla.org/mozilla-central/rev/af960bd72863
http://hg.mozilla.org/mozilla-central/rev/a82beacfb5e3
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.