[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods
From: |
Michael Bagherpour |
Subject: |
[Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice |
Date: |
Sat, 30 Jul 2022 16:42:18 -0400 (EDT) |
Follow-up Comment #5, bug #62802 (project octave):
It seems like we can sort the methods and then call uniq. In fact, the sort
method itself does call uniq if passed in a flag:
string_vector&
string_vector::sort (bool make_uniq)
{
// Don't use Array<std::string>::sort () to allow sorting in place.
octave_sort<std::string> lsort;
lsort.sort (m_data.fortran_vec (), numel ());
if (make_uniq)
uniq ();
return *this;
}
Modifying the code after line 760 in
https://hg.savannah.gnu.org/hgweb/octave/file/e37e46ef0505/libinterp/octave-value/ov-classdef.cc
to the following works for me:
// The following will also find methods for legacy @CLASS objects.
load_path& lp = interp.get_load_path ();
sv.append (lp.methods (class_name));
+ sv.sort(true);
return ovl (Cell (sv));
}
Does that seem right? Any reason not to do this?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62802>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Colin Macdonald, 2022/07/24
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, anonymous, 2022/07/30
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Markus Mützel, 2022/07/30
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Colin Macdonald, 2022/07/30
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Colin Macdonald, 2022/07/30
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice,
Michael Bagherpour <=
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Colin Macdonald, 2022/07/31
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, Michael Bagherpour, 2022/07/31
- [Octave-bug-tracker] [bug #62802] "methods classdef" shows some methods twice, John W. Eaton, 2022/07/31