[Kdenlive-devel] [PATCH 42/46] mltdevicecapture.cpp: Use char for single character
Mikko Rapeli
mikko.rapeli at iki.fi
Sat Jul 14 07:56:29 UTC 2012
Should be faster than using a full string. Found by krazy.
---
src/mltdevicecapture.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mltdevicecapture.cpp b/src/mltdevicecapture.cpp
index e93e541..948e86e 100644
--- a/src/mltdevicecapture.cpp
+++ b/src/mltdevicecapture.cpp
@@ -453,11 +453,11 @@ bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &pa
renderProps->set("mlt_profile", m_activeProfile.toUtf8().constData());
- QStringList paramList = params.split(" ", QString::SkipEmptyParts);
+ QStringList paramList = params.split(' ', QString::SkipEmptyParts);
char *tmp2;
for (int i = 0; i < paramList.count(); i++) {
- tmp = qstrdup(paramList.at(i).section("=", 0, 0).toUtf8().constData());
- QString value = paramList.at(i).section("=", 1, 1);
+ tmp = qstrdup(paramList.at(i).section('=', 0, 0).toUtf8().constData());
+ QString value = paramList.at(i).section('=', 1, 1);
if (value == "%threads") value = QString::number(QThread::idealThreadCount());
tmp2 = qstrdup(value.toUtf8().constData());
renderProps->set(tmp, tmp2);
@@ -642,7 +642,7 @@ void MltDeviceCapture::setOverlayEffect(const QString &tag, QStringList paramete
delete[] tmp;
if (filter && filter->is_valid()) {
for (int j = 0; j < parameters.count(); j++) {
- filter->set(parameters.at(j).section("=", 0, 0).toUtf8().constData(), parameters.at(j).section("=", 1, 1).toUtf8().constData());
+ filter->set(parameters.at(j).section('=', 0, 0).toUtf8().constData(), parameters.at(j).section('=', 1, 1).toUtf8().constData());
}
trackService.attach(*filter);
}
--
1.7.10.4
More information about the Kdenlive
mailing list