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: Julien Bect
Subject: Re: Unnecessary initialization in octave_matrix::double_value ?
Date: Mon, 29 Aug 2016 10:16:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

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

Attachment: Remove-init.patch
Description: Text Data


reply via email to

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