[Kdenlive-devel] [PATCH 32/46] parameterplotter.cpp: Use char for single character
Mikko Rapeli
mikko.rapeli at iki.fi
Sat Jul 14 07:56:19 UTC 2012
Should be faster than using a full string. Found by krazy.
---
src/parameterplotter.cpp | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/parameterplotter.cpp b/src/parameterplotter.cpp
index 21bf09b..a34a320 100644
--- a/src/parameterplotter.cpp
+++ b/src/parameterplotter.cpp
@@ -81,20 +81,20 @@ void ParameterPlotter::setPointLists(const QDomElement& d, const QString& paramN
QDomElement pa = namenode.item(i).toElement();
QDomNode na = pa.firstChildElement("name");
- m_parameterNameList << pa.attribute("namedesc").split(";");
+ m_parameterNameList << pa.attribute("namedesc").split(';');
emit parameterList(m_parameterNameList);
//max_y=pa.attributes().namedItem("max").nodeValue().toInt();
//int val=pa.attributes().namedItem("value").nodeValue().toInt();
QStringList defaults;
- if (pa.attribute("start").contains(";"))
- defaults = pa.attribute("start").split(";");
- else if (pa.attribute("value").contains(";"))
- defaults = pa.attribute("value").split(";");
- else if (pa.attribute("default").contains(";"))
- defaults = pa.attribute("default").split(";");
- QStringList maxv = pa.attribute("max").split(";");
- QStringList minv = pa.attribute("min").split(";");
+ if (pa.attribute("start").contains(';'))
+ defaults = pa.attribute("start").split(';');
+ else if (pa.attribute("value").contains(';'))
+ defaults = pa.attribute("value").split(';');
+ else if (pa.attribute("default").contains(';'))
+ defaults = pa.attribute("default").split(';');
+ QStringList maxv = pa.attribute("max").split(';');
+ QStringList minv = pa.attribute("min").split(';');
for (int i = 0; i < maxv.size() && i < minv.size(); i++) {
if (m_max_y < maxv[i].toInt()) m_max_y = maxv[i].toInt();
if (m_min_y > minv[i].toInt()) m_min_y = minv[i].toInt();
--
1.7.10.4
More information about the Kdenlive
mailing list