r21703 by jghali - make ScribusDoc::getNumberStr() slightly faster
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 6 19:37:22 UTC 2017
Author: jghali
Date: Fri Jan 6 19:37:22 2017
New Revision: 21703
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21703
Log:
make ScribusDoc::getNumberStr() slightly faster
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21703&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Jan 6 19:37:22 2017
@@ -16598,12 +16598,12 @@
numS->m_lastlevel = level;
if (level >= numS->m_nums.count())
return QString();
- Numeration num = numS->m_nums[level];
+
+ Numeration& num = numS->m_nums[level];
num.numFormat = (NumFormat) style.numFormat();
num.start = style.numStart();
num.prefix = style.numPrefix();
num.suffix = style.numSuffix();
- numS->m_nums.replace(level, num);
int currNum = numS->m_counters.at(level);
if (reset)
@@ -16614,7 +16614,7 @@
QString result;
for (int i=0; i <= level; ++i)
{
- Numeration num = numS->m_nums[i];
+ const Numeration& num = numS->m_nums.at(i);
result.append(num.prefix);
result.append(num.numString(numS->m_counters.at(i)));
result.append(num.suffix);
More information about the scribus-commit
mailing list