src/parser.cpp

changeset 141
185eb297dc1e
parent 140
2f383e88acf4
child 144
5d73a6717321
--- a/src/parser.cpp	Mon Sep 27 21:04:45 2021 +0300
+++ b/src/parser.cpp	Tue Sep 28 00:10:29 2021 +0300
@@ -253,6 +253,7 @@
 		}
 		invertNext = false;
 	}
+	/*
 	// Test quadrilateral splitting by splitting all the quadrilaterals
 	QVector<ldraw::quadrilateralid_t> quadrilateral_ids;
 	for (int i = 0; i < editor.model().size(); i += 1)
@@ -268,6 +269,7 @@
 	{
 		ldraw::splitQuadrilateral(editor, id);
 	}
+	*/
 }
 
 static ldraw::Color colorFromString(const QString& colorString)
@@ -344,11 +346,12 @@
 	Q_UNUSED(tokens)
 	if (line.startsWith("0 //"))
 	{
-		return std::make_unique<ldraw::Comment>(line.mid(std::strlen("0 //")).simplified());
+		// lol wut
+		return std::make_unique<ldraw::Comment>(line.mid(std::strlen("0 //")).trimmed());
 	}
 	else
 	{
-		return std::make_unique<ldraw::MetaCommand>(line.mid(1).simplified());
+		return std::make_unique<ldraw::MetaCommand>(line.mid(1).trimmed());
 	}
 }
 
@@ -394,7 +397,7 @@
 
 std::unique_ptr<ldraw::Object> Parser::parseFromString(QString line)
 {
-	line = line.simplified();
+	line = line.trimmed();
 	try
 	{
 		const QStringList tokens = line.split(QRegExp{R"(\s+)"});

mercurial