From 678f18d7e2a7d2b844e92f381372091293980c79 Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Fri, 10 Feb 2006 22:50:11 +0000 Subject: [PATCH] gcc 4 fixes for Mac OS X. part 1 of the landing. Patch by Mark Mentovai. b=294244 r=josh sr=darin a=dbaron --- widget/src/mac/nsDeviceContextMac.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widget/src/mac/nsDeviceContextMac.cpp b/widget/src/mac/nsDeviceContextMac.cpp index a95699a8fb2a..f0ccd697f18d 100644 --- a/widget/src/mac/nsDeviceContextMac.cpp +++ b/widget/src/mac/nsDeviceContextMac.cpp @@ -915,7 +915,7 @@ bool nsDeviceContextMac :: GetMacFontNumber(const nsString& aFontName, short &aF // fontNum, nsFontMetricsMac::SetFont() wouldn't need to call this at all. InitFontInfoList(); FontNameKey key(aFontName); - aFontNum = (short)gFontInfoList->Get(&key); + aFontNum = (short) NS_PTR_TO_INT32(gFontInfoList->Get(&key)); return (aFontNum != 0); } @@ -1116,7 +1116,7 @@ EnumerateFont(nsHashKey *aKey, void *aData, void* closure) PRBool match = PR_FALSE; #if TARGET_CARBON // we need to match the cast of FMFontFamily in nsDeviceContextMac :: InitFontInfoList() - FMFontFamily fontFamily = (FMFontFamily) aData; + FMFontFamily fontFamily = (FMFontFamily) NS_PTR_TO_INT32(aData); TextEncoding fontEncoding; OSStatus status = ::FMGetFontFamilyTextEncoding(fontFamily, &fontEncoding); if (noErr == status) {