mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 17:29:57 +00:00
Allowed to enter booleans as arguments, and removed unused line that cause compilation error
This commit is contained in:
@@ -71,7 +71,9 @@ void Ifc::IfcUntypedEntity::setArgument(unsigned int i, int v) {
|
|||||||
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
|
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
|
||||||
if (arg_type == Argument_INT) {
|
if (arg_type == Argument_INT) {
|
||||||
writable_entity()->setArgument(i,v);
|
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) {
|
void Ifc::IfcUntypedEntity::setArgument(unsigned int i, bool v) {
|
||||||
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
|
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
|
||||||
|
|||||||
@@ -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 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 begin() { return ls.begin(); }
|
||||||
inline it end() { return ls.end(); }
|
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(); }
|
inline unsigned int Size() const { return (unsigned int) ls.size(); }
|
||||||
IfcEntities generalize() {
|
IfcEntities generalize() {
|
||||||
IfcEntities r (new IfcEntityList());
|
IfcEntities r (new IfcEntityList());
|
||||||
|
|||||||
Reference in New Issue
Block a user