Remove IsSimilar() global function for Standard types. Replace usege of IsSimilar() by IsEqual().
Standard_Boolean Find = Standard_False;
while (i <= 68 && !Find)
{
- if (IsSimilar(anEnum.ToCString(),theEnums[i-1]))
+ if (IsEqual(anEnum.ToCString(),theEnums[i-1]))
Find = Standard_True;
else
i++;
return HashCode( ( ( U.I[0] ^ U.I[1] ) & 0x7fffffff ) , Upper ) ;
}
-
-//============================================================================
-//==== IsSimilar : Returns Standard_True if two booleans have the same value
-//============================================================================
-inline Standard_Boolean IsSimilar(const Standard_Address One
- ,const Standard_Address Two)
-{ return One == Two; }
-
//============================================================================
// IsEqual : Returns Standard_True if two CString have the same value
//============================================================================
# include <Standard_Integer.hxx>
# endif
-inline Standard_Boolean IsSimilar(const Standard_CString One
- ,const Standard_CString Two);
__Standard_API Standard_Integer HashCode (const Standard_CString,
const Standard_Integer);
inline Standard_Integer HashCode (const Standard_CString,
__Standard_API int Sprintf (char* theBuffer, const char* theFormat, ...);
//============================================================================
-//==== IsSimilar : Returns Standard_True if two booleans have the same value
+//==== IsEqual : Returns Standard_True if two booleans have the same value
//============================================================================
-inline Standard_Boolean IsSimilar(const Standard_CString One
+inline Standard_Boolean IsEqual(const Standard_CString One
,const Standard_CString Two)
{
return (strcmp(One,Two) == 0);
const Standard_Character Two)
{ return One == Two; }
-// ------------------------------------------------------------------
-// IsSimilar : Returns Standard_True if two characters have the same value
-// ------------------------------------------------------------------
-inline Standard_Boolean IsSimilar(const Standard_Character One,
- const Standard_Character Two)
-{ return One == Two; }
-
// ===============================================
// Character classification functions
//
const Standard_ExtCharacter Two)
{ return One == Two; }
-// ------------------------------------------------------------------
-// IsSimilar : Returns Standard_True if two characters have the same value
-// ------------------------------------------------------------------
-inline Standard_Boolean IsSimilar(const Standard_ExtCharacter One,
- const Standard_ExtCharacter Two)
-{ return One == Two; }
-
#endif
}
#endif
-// ------------------------------------------------------------------
-// IsSimilar : Returns Standard_True if two integers are equal
-// ------------------------------------------------------------------
-inline Standard_Boolean IsSimilar (const Standard_Integer One,
- const Standard_Integer Two)
-{ return One == Two; }
-
-
// ------------------------------------------------------------------
// IsEven : Returns Standard_True if an integer is even
// ------------------------------------------------------------------
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
-// - IsSimilar
// ===============================================
// ==================================
const Standard_Real Value2)
{ return Abs((Value1 - Value2)) < RealSmall(); }
-//-------------------------------------------------------------------
-// IsSimilar : Returns Standard_True if two reals are equal
-//-------------------------------------------------------------------
-inline Standard_Boolean IsSimilar(const Standard_Real One,
- const Standard_Real Two)
-{ return IsEqual (One,Two); }
-
-
-
// *********************************** //
// Class methods //
// //
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
-// - IsSimilar
// ===============================================
// ==================================
const Standard_ShortReal Value2)
{ return Abs((Value1 - Value2)) < ShortRealSmall(); }
-//-------------------------------------------------------------------
-// IsSimilar : Returns Standard_True if two ShortReals are equal
-//-------------------------------------------------------------------
-inline Standard_Boolean IsSimilar(const Standard_ShortReal One,
- const Standard_ShortReal Two)
-{ return IsEqual (One,Two); }
-
#endif
//
Standard_Boolean Standard_Transient::IsInstance(const Standard_CString theTypeName) const
{
- return IsSimilar ( DynamicType()->Name(), theTypeName );
+ return IsEqual ( DynamicType()->Name(), theTypeName );
}
//
Standard_Boolean Standard_Type::SubType (const Standard_CString theName) const
{
- return theName != 0 && (IsSimilar (myName, theName) || (! myParent.IsNull() && myParent->SubType (theName)));
+ return theName != 0 && (IsEqual (myName, theName) || (! myParent.IsNull() && myParent->SubType (theName)));
}
// ------------------------------------------------------------------