src/model.cpp

changeset 379
8d88adffb779
parent 374
75efc3ba5a56
--- a/src/model.cpp	Tue Apr 11 22:51:47 2023 +0300
+++ b/src/model.cpp	Wed Apr 12 01:53:42 2023 +0300
@@ -36,12 +36,12 @@
 static_assert(gcd(16, 4) == 4);
 static_assert(gcd(272, 192) == 16);
 
-static constexpr const char* circularPrimitiveTypeString(const CircularPrimitive& circ)
+static constexpr const char* circularPrimitiveTypeString(const circular_primitive& circ)
 {
-	return circularPrimitiveStems[circ.type];
+	return circularPrimitiveStems[static_cast<unsigned int>(circ.type)];
 }
 
-static QString circularPrimitiveFilePath(const CircularPrimitive& circ)
+static QString circularPrimitiveFilePath(const circular_primitive& circ)
 {
 	QString result;
 	if (circ.fraction.divisions != 16) {
@@ -78,7 +78,7 @@
 		[](const Colored<ConditionalEdge>&) {
 			return ":/icons/linetype-conditionaledge.png";
 		},
-		[](const Colored<CircularPrimitive>&) {
+		[](const Colored<circular_primitive>&) {
 			return ":/icons/linetype-circularprimitive.png";
 		},
 		[](const Comment&) {
@@ -148,7 +148,7 @@
 				.arg(vertexToString(cedge.element.c1))
 				.arg(vertexToString(cedge.element.c2));
 		},
-		[](const Colored<CircularPrimitive>& circ) {
+		[](const Colored<circular_primitive>& circ) {
 			return QStringLiteral("1 %1 %2 %3")
 				.arg(circ.color.index)
 				.arg(transformToString(circ.element.transformation))

mercurial