Bug 670461 - Fix conversion from 'double' to 'PRUint32' build warning in gfx/src/nsRenderingContext.h(73); r=joedrew
authorEd Morley <bmo@edmorley.co.uk>
Thu, 18 Aug 2011 15:17:34 +0200
changeset 75494 58b7de3f9b79b713d74504e922c4bae8511cc34c
parent 75493 690b443ea6891026d87aff42f4e71539033cfb6a
child 75495 6309d93cd072d3d9cc49a3c903e9022b3f64490b
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersjoedrew
bugs670461
milestone9.0a1
Bug 670461 - Fix conversion from 'double' to 'PRUint32' build warning in gfx/src/nsRenderingContext.h(73); r=joedrew
gfx/src/nsRenderingContext.h
--- a/gfx/src/nsRenderingContext.h
+++ b/gfx/src/nsRenderingContext.h
@@ -65,17 +65,17 @@ public:
     NS_INLINE_DECL_REFCOUNTING(nsRenderingContext)
 
     void Init(nsDeviceContext* aContext, gfxASurface* aThebesSurface);
     void Init(nsDeviceContext* aContext, gfxContext* aThebesContext);
 
     // These accessors will never return null.
     gfxContext *ThebesContext() { return mThebes; }
     nsDeviceContext *DeviceContext() { return mDeviceContext; }
-    PRUint32 AppUnitsPerDevPixel() { return mP2A; }
+    PRUint32 AppUnitsPerDevPixel() { return NSToIntRound(mP2A); }
 
     // Graphics state
 
     void PushState(void);
     void PopState(void);
     void IntersectClip(const nsRect& aRect);
     void SetClip(const nsIntRegion& aRegion);
     void SetLineStyle(nsLineStyle aLineStyle);