Commit c01db1166aec133cfd7b63dd16f11caf81d1fdc0

Authored by Scott Klum
1 parent 8983c5bb

Added empty condition to if

Showing 1 changed file with 3 additions and 1 deletions
openbr/plugins/imgproc/if.cpp
@@ -24,7 +24,9 @@ class IfTransform : public MetaTransform @@ -24,7 +24,9 @@ class IfTransform : public MetaTransform
24 { 24 {
25 bool result, ok1 = true, ok2 = true; 25 bool result, ok1 = true, ok2 = true;
26 26
27 - if (comparison == "e") 27 + if (comparison == "empty")
  28 + result = metadata.isEmpty();
  29 + else if (comparison == "e")
28 result = metadata == value; 30 result = metadata == value;
29 else if (comparison == "ne") 31 else if (comparison == "ne")
30 result = metadata != value; 32 result = metadata != value;