r20637 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 29 15:15:05 UTC 2015


Author: jghali
Date: Tue Dec 29 15:15:05 2015
New Revision: 20637

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20637
Log:
fix unneeded memory allocation during text layout

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20637&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Tue Dec 29 15:15:05 2015
@@ -3829,7 +3829,7 @@
 			QColor tmp;
 			double CurXB = ls.x;
 			QRectF scrG;
-			QString oldBack = "";
+			QString oldBack;
 			double oldShade = 100;
 			for (int a = ls.firstItem; a <= last; ++a)
 			{
@@ -3870,7 +3870,7 @@
 					}
 					else
 						scr = QRectF(CurXB, y1, glyphs->wide(), hl);
-					if ((oldBack == "") || ((oldBack == charStyle.backColor()) && (oldShade == charStyle.backShade())))
+					if ((oldBack.isEmpty()) || ((oldBack == charStyle.backColor()) && (oldShade == charStyle.backShade())))
 						scrG |= scr;
 					else if ((oldBack != charStyle.backColor()) || (oldShade != charStyle.backShade()))
 					{
@@ -3888,7 +3888,7 @@
 				}
 				else
 				{
-					oldBack = "";
+					oldBack.clear();
 					oldShade = 100;
 					if (!scrG.isNull())
 					{




More information about the scribus-commit mailing list