diff -r 30f62d96b898 -r 8d23fe8ae91b fbs/fontandbitmapserver/sfbs/FBSFONT.CPP --- a/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP Thu Apr 08 12:02:10 2010 +0100 +++ b/fbs/fontandbitmapserver/sfbs/FBSFONT.CPP Thu Apr 08 12:06:20 2010 +0100 @@ -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(aAny) - reinterpret_cast(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(aOffset + reinterpret_cast(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(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 { @@ -677,3 +677,4 @@ } return CFont::DoExtendedFunction(aFunctionId, aParam); } +