kernel/eka/compsupp/rvct2_2/type_info.cpp
changeset 266 0008ccd16016
parent 259 57b9594f5772
child 272 70a6efdb753f
child 281 13fbfa31d2ba
equal deleted inserted replaced
259:57b9594f5772 266:0008ccd16016
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 // under the terms of the License "ARM EABI LICENCE.txt"
       
     6 // which accompanies this distribution, and is available
       
     7 // in kernel/eka/compsupp.
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <typeinfo>
       
    19 
       
    20 EXPORT_C bool std::type_info::operator==(const std::type_info& rhs) const
       
    21 	{
       
    22 	if (this == &rhs)
       
    23 		{
       
    24 		return true;
       
    25 		}
       
    26 
       
    27 	const char* s1 = this->name();
       
    28 	const char* s2 = rhs.name();
       
    29 
       
    30 	while ( *s1 == *s2 && *s1 != '\0' )
       
    31 		{
       
    32 		s1++;
       
    33 		s2++;
       
    34 		}
       
    35 
       
    36 	return ( *s1 == '\0' && *s2 == '\0' );
       
    37 	}
       
    38 
       
    39 EXPORT_C bool std::type_info::operator!=(const std::type_info& rhs) const
       
    40 	{
       
    41 	return !(*this == rhs);
       
    42 	}
       
    43