[Top][All Lists]

[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::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
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:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]