change return type to bool for one func, remove a const_cast elsewhere

This commit is contained in:
Mark Pictor
2011-11-27 17:49:39 -05:00
parent 59349657da
commit d35f73f87f
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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)
+4 -4
View File
@@ -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;
}
+1 -1
View File
@@ -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