--- a/src/linetypes/propertygenerics.h Tue Jul 27 12:44:54 2021 +0300 +++ b/src/linetypes/propertygenerics.h Tue Jul 27 13:23:34 2021 +0300 @@ -71,6 +71,8 @@ template<ldraw::Property property> inline const char* PROPERTY_NAME = PropertyTraits<property>::name; + constexpr int MAX_POINTS = 4; + struct PropertyKeyValue { Property key; @@ -79,7 +81,7 @@ constexpr Property pointProperty(int n) { - Q_ASSERT(n >= 0 and n < 4); + Q_ASSERT(n >= 0 and n < MAX_POINTS); return static_cast<Property>(static_cast<int>(Property::Point0) + n); }