We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#96 reinstated the subsref functions in Swigref.m. However, when running the test-suite with recent Octave, it generates lots of warnings like
subsref
Swigref.m
warning: 'uint64 matrix' object indexed with empty index list warning: called from subsref at line 29 column 28
an example is generated at
swig/Examples/test-suite/matlab/default_args_runme.m
Line 18 in cd3f6c5
SwigRef.m
[varargout{1}] = builtin('subsref',self,substruct('.',s.subs,'()',{}));
It is caused by the empty cell-array for (). The warning can be reproduced as follows
()
a.x=1; subsref(a,substruct('.','x','()',{}))
This does returns 1 but with the same warning (but is silent in MATLAB).
The simple solution seems to use
[varargout{1}] = builtin('subsref',self,substruct('.',s.subs));
which has the desired effect
The text was updated successfully, but these errors were encountered:
[MATLAB] simplify SwigRef.subsref
b3594ff
SwigRef.subsref used an empty () index, generating warnings with recent Octave. This was superfluous so I've removed it. Fixes jaeandersson#99
No branches or pull requests
#96 reinstated the
subsref
functions inSwigref.m
. However, when running the test-suite with recent Octave, it generates lots of warnings likean example is generated at
swig/Examples/test-suite/matlab/default_args_runme.m
Line 18 in cd3f6c5
This turns out to come from the following line in
SwigRef.m
(generated here)It is caused by the empty cell-array for
()
. The warning can be reproduced as followsThis does returns 1 but with the same warning (but is silent in MATLAB).
The simple solution seems to use
which has the desired effect
The text was updated successfully, but these errors were encountered: