Bug 984242 - Fix unused function warnings in widget/cocoa/nsChildView.mm. r=josh
authorChris Peterson <cpeterson@mozilla.com>
Fri, 14 Mar 2014 23:05:18 -0700
changeset 174235 792f1f76d7a68d07e8318d5b85c79bf53a3cb50a
parent 174234 7bb86a0b7a8d499d3a766268220f4ec41f04797c
child 174236 f3f8ffe30e2b5b8f2bc7ab0d03ef3d66e8ae9b44
push id41228
push usercpeterson@mozilla.com
push dateWed, 19 Mar 2014 06:06:37 +0000
treeherdermozilla-inbound@792f1f76d7a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs984242
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 984242 - Fix unused function warnings in widget/cocoa/nsChildView.mm. r=josh
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -210,44 +210,36 @@ uint32_t nsChildView::sLastInputEventCou
   CGSRegionObj region;
   CGSNewRegionWithRect(&rect, &region);
   return region;
 }
 @end
 
 #pragma mark -
 
-/* Convenience routines to go from a gecko rect to cocoa NSRects and back
+/* Convenience routine to go from a Gecko rect to Cocoa NSRect.
  *
  * Gecko rects (nsRect) contain an origin (x,y) in a coordinate
  * system with (0,0) in the top-left of the screen. Cocoa rects
  * (NSRect) contain an origin (x,y) in a coordinate system with
  * (0,0) in the bottom-left of the screen. Both nsRect and NSRect
  * contain width/height info, with no difference in their use.
  * If a Cocoa rect is from a flipped view, there is no need to
  * convert coordinate systems.
  */
-
+#ifndef __LP64__
 static inline void
-NSRectToGeckoRect(const NSRect & inCocoaRect, nsIntRect & outGeckoRect)
-{
-  outGeckoRect.x = NSToIntRound(inCocoaRect.origin.x);
-  outGeckoRect.y = NSToIntRound(inCocoaRect.origin.y);
-  outGeckoRect.width = NSToIntRound(inCocoaRect.origin.x + inCocoaRect.size.width) - outGeckoRect.x;
-  outGeckoRect.height = NSToIntRound(inCocoaRect.origin.y + inCocoaRect.size.height) - outGeckoRect.y;
-}
-
-static inline void 
 ConvertGeckoRectToMacRect(const nsIntRect& aRect, Rect& outMacRect)
 {
   outMacRect.left = aRect.x;
   outMacRect.top = aRect.y;
   outMacRect.right = aRect.x + aRect.width;
   outMacRect.bottom = aRect.y + aRect.height;
 }
+#endif
 
 // Flips a screen coordinate from a point in the cocoa coordinate system (bottom-left rect) to a point
 // that is a "flipped" cocoa coordinate system (starts in the top-left).
 static inline void
 FlipCocoaScreenCoordinate(NSPoint &inPoint)
 {
   inPoint.y = nsCocoaUtils::FlippedScreenY(inPoint.y);
 }