Mercurial > octave
comparison libinterp/octave-value/ov-range.cc @ 29937:da7210e30f3e
move some utility functions inside octave namespace
* lo-utils.h, lo-utils.cc (is_one_or_zero): Rename from
xis_one_or_zero and move inside octave namespace. Change all uses.
(is_zero): Rename from xis_zero and move inside octave namespace.
Change all uses.
(is_int_or_inf_or_nan): Rename from xis_int_or_inf_or_nan and move
inside octave namespace. Change all uses.
(too_large_for_float): Rename from xtoo_large_for_float and move
inside octave namespace. Change all uses.
(too_large_for_float): Rename from xtoo_large_for_float and move
inside octave namespace. Change all uses.
(is_int_or_inf_or_nan): Rename from xis_int_or_inf_or_nan and move
inside octave namespace. Change all uses.
(fgets): Rename from octave_fgets and move inside octave namespace.
Change all uses.
(fgetl): Rename from octave_fgetl and move inside octave namespace.
Change all uses.
(any_all_test, strsave): Move inside octave namespace. Tag uses with
octave:: prefix as needed.
* lo-utils.h: Provide deprecated templates and inline functions to
preserve old names in global namespace.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 03 Aug 2021 12:34:52 -0400 |
parents | 29a1f8fd8ee6 |
children | 75dff8f2de2e |
comparison
equal
deleted
inserted
replaced
29936:79c6a29dd384 | 29937:da7210e30f3e |
---|---|
374 boolNDArray | 374 boolNDArray |
375 ov_range<T>::bool_array_value (bool warn) const | 375 ov_range<T>::bool_array_value (bool warn) const |
376 { | 376 { |
377 Array<T> matrix = raw_array_value (); | 377 Array<T> matrix = raw_array_value (); |
378 | 378 |
379 if (warn && ! matrix.test_all (xis_one_or_zero<T>)) | 379 if (warn && ! matrix.test_all (octave::is_one_or_zero<T>)) |
380 warn_logical_conversion (); | 380 warn_logical_conversion (); |
381 | 381 |
382 return boolNDArray (matrix); | 382 return boolNDArray (matrix); |
383 } | 383 } |
384 | 384 |