graphicsresourceservices/graphicsresourceimplementation/inc/sgextension.inl
changeset 36 01a6848ebfd7
equal deleted inserted replaced
0:5d03bc08d59c 36:01a6848ebfd7
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Graphics Resource - kernel extension inline functions
       
    15 //
       
    16 
       
    17 #ifndef SGEXTENSION_INL
       
    18 #define SGEXTENSION_INL
       
    19 
       
    20 inline TInt DSgResource::Compare(const TUint64* aId, const DSgResource& aResource)
       
    21 	{
       
    22 	if (*aId > aResource.Id())
       
    23 		{
       
    24 		return 1;
       
    25 		}
       
    26 	if (*aId < aResource.Id())
       
    27 		{
       
    28 		return -1;
       
    29 		}
       
    30 	return 0;
       
    31 	}
       
    32 
       
    33 inline TInt DSgResource::Compare(const DSgResource& aResource1, const DSgResource& aResource2)
       
    34 	{
       
    35 	if (aResource1.Id() > aResource2.Id())
       
    36 		{
       
    37 		return 1;
       
    38 		}
       
    39 	if (aResource1.Id() < aResource2.Id())
       
    40 		{
       
    41 		return -1;
       
    42 		}
       
    43 	return 0;
       
    44 	}
       
    45 
       
    46 #endif // SGEXTENSION_INL