changeset 20072:8e42898f4d73

Don't throw classdef-to-struct warning during isequal (bug #43759). * __isequal__.m: Turn off "Octave:classdef-to-struct" warning locally as algorithm specifically relies on doing this.
author Rik <rik@octave.org>
date Sat, 11 Apr 2015 08:30:20 -0700
parents 98d10871018a
children 3b90259f17f3
files scripts/general/private/__isequal__.m
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/private/__isequal__.m	Sat Apr 11 08:18:42 2015 -0700
+++ b/scripts/general/private/__isequal__.m	Sat Apr 11 08:30:20 2015 -0700
@@ -41,7 +41,7 @@
 ##    and size of each dimension match.
 ## 3. For each argument after x, compare it for equality with x:
 ##    a. struct     compare each member by name, not by order (recursive)
-##    b. object     converted to struct, and then compared as stated above
+##    b. object     convert to struct, and then compare as stated above
 ##    c. cell       compare each member by order (recursive)
 ##    d. char       compare each member with strcmp
 ##    e  fcn_handle compare using overloade 'eq' operator
@@ -78,6 +78,8 @@
 
   ## From here on, compare objects as if they were structures.
   if (t && isobject (x))
+    ## Locally suppress class-to-struct warning.  We know what we are doing.
+    warning ("off", "Octave:classdef-to-struct", "local");
     x = builtin ("struct", x);
     for i = 1:numel (varargin)
       varargin{i} = builtin ("struct", varargin{i});