changeset 20189:ed53c87050e8

findobj.m: Stop warning message when using -regexp option (bug #44610). * findobj.m: Rename temporary variable from 'foo' to 'found' for clarity. Set match to true if found is not empty.
author Rik <rik@octave.org>
date Mon, 23 Mar 2015 20:56:51 -0700
parents f6c901a691d5
children 9d277f245d11
files scripts/plot/util/findobj.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/findobj.m
+++ b/scripts/plot/util/findobj.m
@@ -227,11 +227,11 @@
             match(nh,np) = true;
           else
             if (regularexpression(np))
-              foo = regexp (p.(pname{np}), pvalue{np}, "once");
-              if (isempty (foo))
+              found = regexp (p.(pname{np}), pvalue{np}, "once");
+              if (isempty (found))
                 match(nh,np) = false;
               else
-                match(nh,np) = foo;
+                match(nh,np) = true;
               endif
             elseif (numel (p.(pname{np})) == numel (pvalue{np}))
               if (ischar (pvalue{np}) && ischar (p.(pname{np})))