Commit suggestions in #3992 Thanks @RickBrice

This commit is contained in:
Thomas Krijnen
2023-11-15 11:05:06 +01:00
parent 2545f334a3
commit 3ef4e8152f
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -101,9 +101,9 @@ namespace IfcGeom {
bool binary_op_bool(OpaqueNumber* other) const { bool binary_op_bool(OpaqueNumber* other) const {
auto nnd = dynamic_cast<NumberNativeDouble*>(other); auto nnd = dynamic_cast<NumberNativeDouble*>(other);
if (nnd) { if (nnd) {
return new NumberNativeDouble(Fn(value_, nnd->value_)); return Fn(value_, nnd->value_);
} else { } else {
return nullptr; return false;
} }
} }
@@ -118,9 +118,9 @@ namespace ifcopenshell { namespace geometry {
bool binary_op_bool(OpaqueNumber* other) const { bool binary_op_bool(OpaqueNumber* other) const {
auto nnd = dynamic_cast<NumberEpeck*>(other); auto nnd = dynamic_cast<NumberEpeck*>(other);
if (nnd) { if (nnd) {
return new NumberEpeck(Fn(value_, nnd->value_)); return Fn(value_, nnd->value_);
} else { } else {
return nullptr; return false;
} }
} }
@@ -475,7 +475,7 @@ public:
} }
virtual std::unique_ptr<halfspace_tree<Kernel>> map(const std::map<typename Kernel::Plane_3, typename Kernel::Plane_3, PlaneLess<Kernel>>& m) const { virtual std::unique_ptr<halfspace_tree<Kernel>> map(const std::map<typename Kernel::Plane_3, typename Kernel::Plane_3, PlaneLess<Kernel>>& m) const {
std::array<Kernel::FT, 3> abcd = { {plane_.a(), plane_.b(), plane_.c()} }; std::array<Kernel::FT, 3> abcd{ plane_.a(), plane_.b(), plane_.c() };
auto minel = std::min_element(abcd.begin(), abcd.end()); auto minel = std::min_element(abcd.begin(), abcd.end());
auto maxel = std::max_element(abcd.begin(), abcd.end()); auto maxel = std::max_element(abcd.begin(), abcd.end());
auto maxval = ((-*minel) > *maxel) ? (-*minel) : *maxel; auto maxval = ((-*minel) > *maxel) ? (-*minel) : *maxel;