From c01db1166aec133cfd7b63dd16f11caf81d1fdc0 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Mon, 30 Apr 2018 10:01:21 -0600 Subject: [PATCH] Added empty condition to if --- openbr/plugins/imgproc/if.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/imgproc/if.cpp b/openbr/plugins/imgproc/if.cpp index 58ba041..91714f0 100644 --- a/openbr/plugins/imgproc/if.cpp +++ b/openbr/plugins/imgproc/if.cpp @@ -24,7 +24,9 @@ class IfTransform : public MetaTransform { bool result, ok1 = true, ok2 = true; - if (comparison == "e") + if (comparison == "empty") + result = metadata.isEmpty(); + else if (comparison == "e") result = metadata == value; else if (comparison == "ne") result = metadata != value; -- libgit2 0.21.4