fbs/fontandbitmapserver/sfbs/FBSFONT.CPP
changeset 110 7f25ef56562d
parent 36 01a6848ebfd7
child 111 29ddb8a72f0e
--- a/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP	Fri Jun 11 14:58:47 2010 +0300
+++ b/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP	Wed Jun 23 19:41:15 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -38,7 +38,7 @@
 	{
 	if (aAny && aHeapBase)
 		{
-		return (TInt)aAny - (TInt)aHeapBase;
+		return reinterpret_cast<TInt>(aAny) - reinterpret_cast<TInt>(aHeapBase);
 		}
 	return 0;
 	}
@@ -50,11 +50,11 @@
 @return A pointer relative to the passed heap base.
 @see PointerToOffset()
  */
-LOCAL_C TAny* OffsetToPointer(const TInt aOffset, TUint8* aHeapBase)
+LOCAL_C TAny* OffsetToPointer(TInt aOffset, TUint8* aHeapBase)
 	{
 	if (aOffset && aHeapBase)
 		{
-		return (TAny*)(aOffset + (TInt)aHeapBase);
+		return reinterpret_cast<TAny*>(aOffset + reinterpret_cast<TInt>(aHeapBase));
 		}
 	return NULL;
 	}
@@ -469,10 +469,10 @@
 			{				
 			// Translate the offsets sent to the server back to pointers relative to
 			// the heap base of the current process
-			const TOpenFontCharMetrics* temp = (const TOpenFontCharMetrics*)OffsetToPointer(paramsBuf().iMetricsOffset, iFbs->HeapBase());
-			if (temp)
+			const TOpenFontCharMetrics* metrics = (const TOpenFontCharMetrics*)OffsetToPointer(paramsBuf().iMetricsOffset, iFbs->HeapBase());
+			if (metrics)
 				{
-				aMetrics = *temp;
+				aMetrics = *metrics;
 				}
 			aBitmap = static_cast<TUint8*>(OffsetToPointer(paramsBuf().iBitmapPointerOffset, iFbs->HeapBase()));			
 			}
@@ -587,7 +587,7 @@
 EXPORT_C TBool CFbsFont::HasCharacter(TInt aCode) const
 	{
 	if (iHandle)
-		{		
+		{
 		return iFbs->SendCommand(EFbsMessHasCharacter,iHandle,aCode);
 		}
 	return EFalse;
@@ -621,7 +621,7 @@
 
 /** help DoExtendedFunction to perform KFontDeleteShaping function
 @param aParam Input parameter block
-@return KErrNone if successful, KErrBadHandle if the font does not have a valid handle.
+@return KErrNone if successful, KErrGeneral if the font does not have a valid handle.
 */
 TInt CFbsFont::DoFontDeleteShaping(TFontShapeDeleteFunctionParameters* aParam) const
 	{
@@ -775,3 +775,4 @@
 		}
 	return CFont::DoExtendedFunction(aFunctionId, aParam);
 	}
+