diff --git a/src/ifcparse/IfcSpfHeader.cpp b/src/ifcparse/IfcSpfHeader.cpp index d2445c5922..4a4e5316c8 100644 --- a/src/ifcparse/IfcSpfHeader.cpp +++ b/src/ifcparse/IfcSpfHeader.cpp @@ -47,7 +47,7 @@ void IfcSpfHeader::readParen() { } void IfcSpfHeader::readTerminal(const std::string& term, Trail trail) { - if (TokenFunc::asString(_lexer->Next()) != term) { + if (TokenFunc::asStringRef(_lexer->Next()) != term) { throw IfcException(std::string("Expected " + term)); } if (trail == TRAILING_SEMICOLON) {