Skip to content

Commit

Permalink
avoid error in matlab 2017a, close #34
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Mar 27, 2017
1 parent 4a09ac3 commit 86ef12a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions savejson.m
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,8 @@

%%-------------------------------------------------------------------------
function txt=matlabobject2json(name,item,level,varargin)
if numel(item) == 0 %empty object
st = struct();
else
st = struct();
if numel(item) > 0 %non-empty object
% "st = struct(item);" would produce an inmutable warning, because it
% make the protected and private properties visible. Instead we get the
% visible properties
Expand Down
5 changes: 2 additions & 3 deletions saveubjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,8 @@

%%-------------------------------------------------------------------------
function txt=matlabobject2ubjson(name,item,level,varargin)
if numel(item) == 0 %empty object
st = struct();
else
st = struct();
if numel(item) > 0 %non-empty object
% "st = struct(item);" would produce an inmutable warning, because it
% make the protected and private properties visible. Instead we get the
% visible properties
Expand Down

0 comments on commit 86ef12a

Please sign in to comment.