Last Comment Bug 670338 - Add double overload to NSToIntRound to stop build warnings
: Add double overload to NSToIntRound to stop build warnings
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla8
Assigned To: Ed Morley [:emorley]
: Milan Sreckovic [:milan]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

Description User image 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 User image 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 User image Ed Morley [:emorley] 2011-07-09 09:14:55 PDT
Comment 3 User image 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 User image Ed Morley [:emorley] 2011-07-10 03:43:00 PDT
Passed try (comment 2).
Comment 5 User image Boris Zbarsky [:bz] (still a bit busy) 2011-07-11 06:21:23 PDT
Comment 6 User image Mounir Lamouri (:mounir) 2011-07-12 03:42:33 PDT
Comment 7 User image :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: <>
Comment 8 User image Joe Drew (not getting mail) 2011-07-17 17:30:25 PDT
And this backout was merged to m-c:
Comment 9 User image Marco Bonardo [::mak] 2011-07-27 03:42:53 PDT

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