change return type to bool for one func, remove a const_cast elsewhere
This commit is contained in:
@@ -1315,7 +1315,7 @@ class EntityDescriptor : public TypeDescriptor {
|
||||
void AddSubtype(EntityDescriptor *ed)
|
||||
{ _subtypes.AddNode(ed); }
|
||||
void AddSupertype_Stmt(const char *s) { _supertype_stmt = s; }
|
||||
const char * Supertype_Stmt() { return const_cast<char *>(_supertype_stmt.c_str()); }
|
||||
const char * Supertype_Stmt() { return _supertype_stmt.c_str(); }
|
||||
std::string& supertype_stmt_() { return _supertype_stmt; }
|
||||
|
||||
void AddSupertype(EntityDescriptor *ed)
|
||||
|
||||
@@ -816,13 +816,13 @@ int STEPattribute::is_null() const {
|
||||
/**************************************************************//**
|
||||
** evaluates the equality of two attributes
|
||||
** Side Effects: none
|
||||
** \return int -- if 0 => not equal
|
||||
** \return bool -- if false => not equal
|
||||
******************************************************************/
|
||||
int operator == ( STEPattribute & a1, STEPattribute & a2 ) {
|
||||
bool operator == ( STEPattribute & a1, STEPattribute & a2 ) {
|
||||
if ( a1.aDesc == a2.aDesc ) {
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ class STEPattribute {
|
||||
// UNDEFINED
|
||||
STEPattribute (const class AttrDescriptor& d, SCLundefined *p);
|
||||
|
||||
friend int operator == (STEPattribute &a1, STEPattribute &a2);
|
||||
friend bool operator == (STEPattribute &a1, STEPattribute &a2);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user