]> git.sesse.net Git - kdenlive/commitdiff
Avoid triggering unspecified behavior in string comparisons.
authorRay Lehtiniemi <rayl@mail.com>
Wed, 8 Apr 2009 14:23:11 +0000 (14:23 +0000)
committerRay Lehtiniemi <rayl@mail.com>
Wed, 8 Apr 2009 14:23:11 +0000 (14:23 +0000)
Eliminate a bunch of "warning: comparison with string literal results
in unspecified behaviour" messages.

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
svn path=/trunk/kdenlive/; revision=3253

src/docclipbase.cpp
src/renderer.cpp

index e7edc03e8dff879e932bfc926bab92408ad94fd3..5f381bbb741833997c19c1d6ba889cd8969cbaba 100644 (file)
@@ -579,14 +579,14 @@ void DocClipBase::slotRefreshProducer()
             int ct = 0;
             Mlt::Filter *filter = clipService.filter(ct);
             while (filter) {
-                if (filter->get("mlt_service") == "luma") {
+                if (strcmp(filter->get("mlt_service"), "luma") == 0) {
                     break;
                 }
                 ct++;
                 filter = clipService.filter(ct);
             }
 
-            if (filter && filter->get("mlt_service") == "luma") {
+            if (filter && strcmp(filter->get("mlt_service"), "luma") == 0) {
                 filter->set("period", getProperty("ttl").toInt() - 1);
                 filter->set("luma.out", getProperty("luma_duration").toInt());
                 QString resource = getProperty("luma_file");
@@ -618,7 +618,7 @@ void DocClipBase::slotRefreshProducer()
             int ct = 0;
             Mlt::Filter *filter = clipService.filter(0);
             while (filter) {
-                if (filter->get("mlt_service") == "luma") {
+                if (strcmp(filter->get("mlt_service"), "luma") == 0) {
                     clipService.detach(*filter);
                 } else ct++;
                 filter = clipService.filter(ct);
index 01ba6e42cb2ee7a0ad32ef3e56ecf4cc6e131f76..a2cf91aac014bd51c6645ba52dd1bb34ffb45d91 100644 (file)
@@ -1452,7 +1452,7 @@ void Render::mltCutClip(int track, GenTime position)
     int ct = 0;
     Mlt::Filter *filter = clipService.filter(ct);
     while (filter) {
-        if (filter->is_valid() && filter->get("kdenlive_id") != "") {
+        if (filter->is_valid() && strcmp(filter->get("kdenlive_id"), "")) {
             // looks like there is no easy way to duplicate a filter,
             // so we will create a new one and duplicate its properties
             Mlt::Filter *dup = new Mlt::Filter(*m_mltProfile, filter->get("mlt_service"));
@@ -1847,7 +1847,7 @@ bool Render::mltRemoveEffect(int track, GenTime position, QString index, bool up
     int ct = 0;
     Mlt::Filter *filter = clipService.filter(ct);
     while (filter) {
-        if ((index == "-1" && filter->get("kdenlive_id") != "")  || filter->get("kdenlive_ix") == index) {// && filter->get("kdenlive_id") == id) {
+        if ((index == "-1" && strcmp(filter->get("kdenlive_id"), ""))  || filter->get("kdenlive_ix") == index) {// && filter->get("kdenlive_id") == id) {
             if (clipService.detach(*filter) == 0) success = true;
             kDebug() << " / / / DLEETED EFFECT: " << ct;
         } else if (updateIndex) {