]> git.saurik.com Git - wxWidgets.git/commitdiff
some float -> int conversion warnings suppressed (but I wonder if this is really...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jul 2003 22:26:16 +0000 (22:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jul 2003 22:26:16 +0000 (22:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/dc.mm
src/cocoa/statbox.mm

index 7b54beb5905ea94d5842545115c59ce5e867555d..7161a232ca256afee933a63827b76d1d858c687b 100644 (file)
@@ -88,9 +88,9 @@ void wxDC::DoGetTextExtent(const wxString& text, wxCoord *x, wxCoord *y, wxCoord
     NSRange glyphRange = [sm_cocoaNSLayoutManager glyphRangeForTextContainer:sm_cocoaNSTextContainer];
     NSRect usedRect = [sm_cocoaNSLayoutManager usedRectForTextContainer:sm_cocoaNSTextContainer];
     if(x)
-        *x=usedRect.size.width;
+        *x=(int)usedRect.size.width;
     if(y)
-        *y=usedRect.size.height;
+        *y=(int)usedRect.size.height;
     if(descent)
         *descent=0;
     if(externalLeading)
index 23dd3261d615fd009a3a8adeb87c91b931676e50..cc8487588116043c708cf5fcc20aea7e8f3cefdb 100644 (file)
@@ -47,12 +47,12 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
 {
     NSRect contentRect = [[GetNSBox() contentView] frame];
     NSRect thisRect = [m_cocoaNSView frame];
-    *borderTop = thisRect.size.height - (contentRect.origin.y+contentRect.size.height);
-    *borderOther = thisRect.size.width - (contentRect.origin.x+contentRect.size.width);
-    int nextBorder = contentRect.origin.y;
+    *borderTop = (int)(thisRect.size.height - (contentRect.origin.y+contentRect.size.height));
+    *borderOther = (int)(thisRect.size.width - (contentRect.origin.x+contentRect.size.width));
+    int nextBorder = (int)contentRect.origin.y;
     if(nextBorder > *borderOther)
         *borderOther = nextBorder;
-    nextBorder = contentRect.origin.x;
+    nextBorder = (int)contentRect.origin.x;
     if(nextBorder > *borderOther)
         *borderOther = nextBorder;
 }