octave-maintainers
[Top][All Lists]
Advanced

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

Re: Unnecessary initialization in octave_matrix::double_value ?


From: Rik
Subject: Re: Unnecessary initialization in octave_matrix::double_value ?
Date: Wed, 14 Sep 2016 08:21:07 -0700

On 08/29/2016 09:00 AM, address@hidden wrote:
Subject:
Re: Unnecessary initialization in octave_matrix::double_value ?
From:
Julien Bect <address@hidden>
Date:
08/29/2016 01:16 AM
To:
address@hidden
List-Post:
<mailto:address@hidden>
Precedence:
list
MIME-Version:
1.0
References:
<address@hidden> <address@hidden> <address@hidden>
In-Reply-To:
<address@hidden>
Message-ID:
<address@hidden>
Content-Type:
multipart/mixed; boundary="------------68C5BD7E8B34E799C7CAAAA2"
Message:
1

Le 28/08/2016 à 16:34, Julien Bect a écrit :
Le 28/08/2016 à 16:17, John W. Eaton a écrit :
You are right, that initialization is no longer needed.  It is left over from when the error function did not throw an exception but just printed a message and set a global warning state, then returned.  So in the old days the function would always return something.  A NaN was better than undefined.  Although much of the work has been done to adapt to the new way that error works, there are still many small things like this to clean up.

Ok, I will prepare a patch for ::float_value() and ::double_value().

Here is a first patch.

If this first patch is accepted, I can do the same for complex_value, matrix_value, array_value, etc.

@++
Julien

9/14/16

Julien,

I pushed your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/6bf1cbb90705).  If you do have the energy to tackle complex_value, matrix_value, etc. that would be very good.

Thanks,
Rik

reply via email to

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