From 22563f7283014b9c49dc41ddd03ea1375bc53307 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 21 Jun 2013 10:25:05 -0700 Subject: [PATCH] Use a char* instead of a std::string for the std::ofstream constructor --- src/ifcwrap/IfcPython.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcwrap/IfcPython.i b/src/ifcwrap/IfcPython.i index 8b6d43eb4b..13d7a3de24 100644 --- a/src/ifcwrap/IfcPython.i +++ b/src/ifcwrap/IfcPython.i @@ -42,7 +42,7 @@ %rename("Entity") IfcUntypedEntity; %typemap(out) IfcEntities { - const unsigned size = $1 ? $1->Size() : 0; + const unsigned size = $1->Size(); $result = PyList_New(size); for (unsigned i = 0; i < size; ++i) { PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_Ifc__IfcUntypedEntity, 0); @@ -144,7 +144,7 @@ $self->AddEntity(e); } void write(const std::string& fn) { - std::ofstream f(fn); + std::ofstream f(fn.c_str()); f << (*$self); } }