mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
update parse example for optional<double>
This commit is contained in:
@@ -71,8 +71,8 @@ int main(int argc, char** argv) {
|
||||
|
||||
const IfcSchema::IfcWindow* window;
|
||||
if ((window = element->as<IfcSchema::IfcWindow>()) != 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user