Skip to content

Commit 4b2bbc6

Browse files
committed
Correctly redirect parse status update messages
1 parent 04aea46 commit 4b2bbc6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ifcparse/IfcParse.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ bool Ifc::Init(IfcParse::File* f) {
643643
int x = 0;
644644
EntityPtr e;
645645
IfcUtil::IfcSchemaEntity entity = 0;
646-
if ( log1 ) std::cout << "Scanning file..." << std::endl;
646+
if ( log1 ) (*log1) << "Scanning file..." << std::endl;
647647
while ( ! file->eof ) {
648648
if ( currentId ) {
649649
try {
@@ -654,7 +654,7 @@ bool Ifc::Init(IfcParse::File* f) {
654654
Ifc::LogMessage("Error",ex.what());
655655
continue;
656656
}
657-
if ( log1 && !((++x)%1000) ) std::cout << "\r#" << currentId << " " << std::flush;
657+
if ( log1 && !((++x)%1000) ) (*log1) << "\r#" << currentId << " " << std::flush;
658658
if ( entity->is(Ifc2x3::Type::IfcRoot) ) {
659659
Ifc2x3::IfcRoot::ptr ifc_root = (Ifc2x3::IfcRoot::ptr) entity;
660660
try {
@@ -708,7 +708,7 @@ bool Ifc::Init(IfcParse::File* f) {
708708
previous = token;
709709
}
710710

711-
if ( log1 ) std::cout << "\rDone scanning file " << std::endl;
711+
if ( log1 ) (*log1) << "\rDone scanning file " << std::endl;
712712

713713
Ifc2x3::IfcUnitAssignment::list unit_assignments = EntitiesByType<Ifc2x3::IfcUnitAssignment>();
714714
IfcUtil::IfcAbstractSelect::list units = IfcUtil::IfcAbstractSelect::list();

0 commit comments

Comments
 (0)