# HG changeset patch # User Rik # Date 1428766220 25200 # Node ID 8e42898f4d731f89e1e46d5f87462349c9515db0 # Parent 98d10871018ac1fbfd03ff757bc3ecbca5949e78 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. diff -r 98d10871018a -r 8e42898f4d73 scripts/general/private/__isequal__.m --- 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});