MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / less_to_order_optional

Function less_to_order_optional

src/ifcgeom/taxonomy.cpp:91–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90 template <typename T>
91 int less_to_order_optional(const boost::optional<T>& a, const boost::optional<T>& b) {
92 if (a && b) {
93 return less_to_order(*a, *b);
94 }
95 else if (!a && !b) {
96 return 0;
97 }
98 else if (a) {
99 return 1;
100 }
101 else {
102 return -1;
103 }
104 }
105
106 int compare(const boost::variant<boost::blank, point3::ptr, double>& a, const boost::variant<boost::blank, point3::ptr, double>& b) {
107 bool a_lt_b, b_lt_a;

Callers

nothing calls this directly

Calls 1

less_to_orderFunction · 0.85

Tested by

no test coverage detected