Last Comment Bug 670338 - Add double overload to NSToIntRound to stop build warnings
: Add double overload to NSToIntRound to stop build warnings
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Ed Morley [:emorley]
:
: Milan Sreckovic [:milan]
Mentors:
Depends on: 629196
Blocks: buildwarning 447838 670461
  Show dependency treegraph
 
Reported: 2011-07-09 04:04 PDT by Ed Morley [:emorley]
Modified: 2011-07-27 03:42 PDT (History)
4 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (745 bytes, patch)
2011-07-09 04:36 PDT, Ed Morley [:emorley]
roc: review+
Details | Diff | Splinter Review

Description Ed Morley [:emorley] 2011-07-09 04:04:33 PDT
+++ 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.
Comment 1 Ed Morley [:emorley] 2011-07-09 04:36:12 PDT
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.
Comment 2 Ed Morley [:emorley] 2011-07-09 09:14:55 PDT
http://dev.philringnalda.com/tbpl/?tree=Try&rev=24df92bc84bb
Comment 3 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-07-10 03:24:18 PDT
Comment on attachment 544978 [details] [diff] [review]
Patch v1

Review of attachment 544978 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 4 Ed Morley [:emorley] 2011-07-10 03:43:00 PDT
Passed try (comment 2).
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2011-07-11 06:21:23 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/ed3036facfb2
Comment 6 Mounir Lamouri (:mounir) 2011-07-12 03:42:33 PDT
Merged:
http://hg.mozilla.org/mozilla-central/rev/ed3036facfb2
Comment 7 :Ehsan Akhgari 2011-07-15 13:29:58 PDT
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>
Comment 8 Joe Drew (not getting mail) 2011-07-17 17:30:25 PDT
And this backout was merged to m-c: http://hg.mozilla.org/mozilla-central/rev/af960bd72863
Comment 9 Marco Bonardo [::mak] 2011-07-27 03:42:53 PDT
http://hg.mozilla.org/mozilla-central/rev/a82beacfb5e3

Note You need to log in before you can comment on or make changes to this bug.