r23149 by jghali - Small optimization for FPointArray::parseSVG()

scribus-commit scribus-commit at lists.scribus.net
Fri Aug 23 03:48:59 UTC 2019


Author: jghali
Date: Fri Aug 23 03:48:59 2019
New Revision: 23149

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23149
Log:
Small optimization for FPointArray::parseSVG()

Modified:
    trunk/Scribus/scribus/fpointarray.cpp

Modified: trunk/Scribus/scribus/fpointarray.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23149&path=/trunk/Scribus/scribus/fpointarray.cpp
==============================================================================
--- trunk/Scribus/scribus/fpointarray.cpp	(original)
+++ trunk/Scribus/scribus/fpointarray.cpp	Fri Aug 23 03:48:59 2019
@@ -1108,7 +1108,9 @@
 		ret = true;
 	if (size() > 2)
 	{
-		if ((point(0).x() == point(size()-2).x()) && (point(0).y() == point(size()-2).y()) && (moveCount == 1))
+		const FPoint& p0 = point(0);
+		const FPoint& p2 = point(size() - 2);
+		if ((p0.x() == p2.x()) && (p0.y() == p2.y()) && (moveCount == 1))
 			ret = false;
 	}
 




More information about the scribus-commit mailing list