Allowed to enter booleans as arguments, and removed unused line that cause compilation error

This commit is contained in:
Yorik van Havre
2013-12-13 16:22:37 -02:00
parent e936ba8391
commit 88f6242804
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -71,7 +71,9 @@ void Ifc::IfcUntypedEntity::setArgument(unsigned int i, int v) {
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
if (arg_type == Argument_INT) {
writable_entity()->setArgument(i,v);
} else invalid_argument(i,"INT");
} else if ( (arg_type == Argument_BOOL) && ( (v == 0) || (v == 1) ) ) {
writable_entity()->setArgument(i, (bool) v);
} else invalid_argument(i,"INT");
}
void Ifc::IfcUntypedEntity::setArgument(unsigned int i, bool v) {
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
+1 -1
View File
@@ -186,7 +186,7 @@ public:
inline void push(SHARED_PTR< IfcTemplatedEntityList<T> > t) { for ( typename T::it it = t->begin(); it != t->end(); ++it ) push(*it); }
inline it begin() { return ls.begin(); }
inline it end() { return ls.end(); }
inline T operator[] (int i) { return ls[i]; }
//inline T operator[] (int i) { return ls[i]; }
inline unsigned int Size() const { return (unsigned int) ls.size(); }
IfcEntities generalize() {
IfcEntities r (new IfcEntityList());