From f6da8285f748f898541e3104a7cc499d28c7530c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 1 Dec 2011 11:19:27 +0000 Subject: [PATCH] Use std::string instead of char* for IfcGeomObjects::Init() --- src/ifcgeom/IfcGeomObjects.cpp | 4 ++-- src/ifcgeom/IfcGeomObjects.h | 4 ++-- src/ifcwrap/Interface.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index c5bb8e62ed..1b227a0b58 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -432,7 +432,7 @@ const IfcGeomObjects::IfcObject* IfcGeomObjects::GetObject(int id) { const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() { return current_geom_obj; } -bool IfcGeomObjects::Init(const char* fn) { +bool IfcGeomObjects::Init(const std::string fn) { return IfcGeomObjects::Init(fn, 0, 0); } bool _Init() { @@ -449,7 +449,7 @@ bool _Init() { total = shapereps->Size(); return true; } -bool IfcGeomObjects::Init(const char* fn, std::ostream* log1, std::ostream* log2) { +bool IfcGeomObjects::Init(const std::string fn, std::ostream* log1, std::ostream* log2) { Ifc::SetOutput(log1,log2); if ( !Ifc::Init(fn) ) return false; return _Init(); diff --git a/src/ifcgeom/IfcGeomObjects.h b/src/ifcgeom/IfcGeomObjects.h index b2cf90d865..f24af91d49 100644 --- a/src/ifcgeom/IfcGeomObjects.h +++ b/src/ifcgeom/IfcGeomObjects.h @@ -115,9 +115,9 @@ namespace IfcGeomObjects { IfcGeomObject(int my_id, int p_id, const std::string& n, const std::string& t, const std::string& g, const gp_Trsf& trsf, IfcMesh* m); }; - bool Init(const char* fn); + bool Init(const std::string fn); bool Init(void* data, int len); - bool Init(const char* fn, std::ostream* log1= 0, std::ostream* log2= 0); + bool Init(const std::string fn, std::ostream* log1= 0, std::ostream* log2= 0); bool Init(std::istream& f, int len, std::ostream* log1= 0, std::ostream* log2= 0); void Settings(int setting, bool value); bool CleanUp(); diff --git a/src/ifcwrap/Interface.h b/src/ifcwrap/Interface.h index 1b885edf17..abdcac6d23 100644 --- a/src/ifcwrap/Interface.h +++ b/src/ifcwrap/Interface.h @@ -48,7 +48,7 @@ namespace IfcGeomObjects { bool Next(); const IfcGeomObject* Get(); - bool Init(const char* fn); + bool Init(const std::string fn); void Settings(int setting, bool value); int Progress(); const IfcObject* GetObject(int id);