octave-maintainers
[Top][All Lists]
Advanced

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

Re: const mapper functions


From: Rik
Subject: Re: const mapper functions
Date: Tue, 8 Jan 2019 14:04:41 -0800

On 01/08/2019 01:03 PM, John W. Eaton wrote:
> On 1/8/19 3:24 PM, Rik wrote:
>> jwe,
>>
>> Is there any reason not to make the function reference passed in to
>> do_rc_map constant?
>>
>> ov-flt-re-mat.cc (738)
>>      V669     The 'fcn' argument is a non-constant reference. The analyzer
>> is unable to determine the position at which this argument is being
>> modified. It is possible that the function contains an error.
>>
>> Line 737-738 of ov-flt-re-mat.cc is
>>
>> static octave_value
>> do_rc_map (const FloatNDArray& a, FloatComplex (&fcn) (float))
>>
>> The other *-re-mat.cc have the same question.  The function passed in is a
>> mapper like sin, cos, etc. and I can't imagine we would change it
>> mid-stream.
>
> I'm in favor of declaring any reference or pointer arguments and member
> functions const if we can.  So yes, if you want to do i and have the
> time, please fix them.

I don't have time this cycle, but good to know we might change it later.

--Rik





reply via email to

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