fbs/fontandbitmapserver/sfbs/FBSCLI.CPP
branchRCL_3
changeset 26 15986eb6c500
parent 0 5d03bc08d59c
child 150 57c618273d5c
equal deleted inserted replaced
19:ac96196b945c 26:15986eb6c500
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    33  */
    33  */
    34 LOCAL_C TInt PointerToOffset(const TAny* aAny, TInt aHeapBase)
    34 LOCAL_C TInt PointerToOffset(const TAny* aAny, TInt aHeapBase)
    35 	{
    35 	{
    36 	if (aAny && aHeapBase)
    36 	if (aAny && aHeapBase)
    37 		{
    37 		{
    38 		return (TInt)aAny - (TInt)aHeapBase;
    38 		return reinterpret_cast<TInt>(aAny) - aHeapBase;
    39 		}
    39 		}
    40 	return 0;
    40 	return 0;
    41 	}
    41 	}
    42 
    42 
    43 /** Helper function for converting an offset (that was calculated using
    43 /** Helper function for converting an offset (that was calculated using
    45 @param aOffset The offset to be converted to a pointer.
    45 @param aOffset The offset to be converted to a pointer.
    46 @param aHeapBase The heap base of the current process.
    46 @param aHeapBase The heap base of the current process.
    47 @return A pointer relative to the passed heap base.
    47 @return A pointer relative to the passed heap base.
    48 @see PointerToOffset()
    48 @see PointerToOffset()
    49  */
    49  */
    50 LOCAL_C TAny* OffsetToPointer(const TInt aOffset, TInt aHeapBase)
    50 LOCAL_C TAny* OffsetToPointer(TInt aOffset, TInt aHeapBase)
    51 	{
    51 	{
    52 	if (aOffset && aHeapBase)
    52 	if (aOffset && aHeapBase)
    53 		{
    53 		{
    54 		return (TAny*)(aOffset + (TInt)aHeapBase);
    54 		return reinterpret_cast<TAny*>(aOffset + aHeapBase);
    55 		}
    55 		}
    56 	return NULL;
    56 	return NULL;
    57 	}
    57 	}
    58 
    58 
    59 CFbClient::CFbClient(RHeap* aHeap):
    59 CFbClient::CFbClient(RHeap* aHeap):