From 8a7016c13541b6f6ebb9371f1899cd530350893e Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 7 Aug 2021 10:41:00 +0200 Subject: [PATCH] update parse example for optional --- src/examples/IfcParseExamples.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp index 15807a35cc..c5eedae235 100644 --- a/src/examples/IfcParseExamples.cpp +++ b/src/examples/IfcParseExamples.cpp @@ -71,8 +71,8 @@ int main(int argc, char** argv) { const IfcSchema::IfcWindow* window; if ((window = element->as()) != 0) { - if (window->hasOverallWidth() && window->hasOverallHeight()) { - const double area = window->OverallWidth()*window->OverallHeight(); + if (window->OverallWidth() && window->OverallHeight()) { + const double area = *window->OverallWidth() * *window->OverallHeight(); std::cout << "The area of this window is " << area << std::endl; } }