mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +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;
|
const IfcSchema::IfcWindow* window;
|
||||||
if ((window = element->as<IfcSchema::IfcWindow>()) != 0) {
|
if ((window = element->as<IfcSchema::IfcWindow>()) != 0) {
|
||||||
if (window->hasOverallWidth() && window->hasOverallHeight()) {
|
if (window->OverallWidth() && window->OverallHeight()) {
|
||||||
const double area = window->OverallWidth()*window->OverallHeight();
|
const double area = *window->OverallWidth() * *window->OverallHeight();
|
||||||
std::cout << "The area of this window is " << area << std::endl;
|
std::cout << "The area of this window is " << area << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user