octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65712] sort over InF dimension coredumps


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #65712] sort over InF dimension coredumps
Date: Wed, 8 May 2024 09:34:49 -0400 (EDT)

Follow-up Comment #25, bug #65712 (group octave):

Looking at it some more, I have a question. This is the code sequence
currently:

  Array<T, Alloc> m (dims ());

  dim_vector dv = m.dims ();

  if (m.numel () < 1)
    return m;

  if (dim >= dv.ndims ())
    return *this


Do we even need to construct m if we are only going to return *this early? I
couldn't tell the reason that dim was being compared to dv.ndims() instead of
this->ndims().

Is it OK to move that early return before the construction of m?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65712>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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