diff liboctave/array/dNDArray.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 7faff48840eb
children 796f54d4ddbf
line wrap: on
line diff
--- a/liboctave/array/dNDArray.cc	Thu Mar 17 10:50:22 2016 +0530
+++ b/liboctave/array/dNDArray.cc	Tue Aug 03 12:34:52 2021 -0400
@@ -329,19 +329,19 @@
 bool
 NDArray::any_element_not_one_or_zero (void) const
 {
-  return ! test_all (xis_one_or_zero);
+  return ! test_all (octave::is_one_or_zero);
 }
 
 bool
 NDArray::all_elements_are_zero (void) const
 {
-  return test_all (xis_zero);
+  return test_all (octave::is_zero);
 }
 
 bool
 NDArray::all_elements_are_int_or_inf_or_nan (void) const
 {
-  return test_all (xis_int_or_inf_or_nan);
+  return test_all (octave::is_int_or_inf_or_nan);
 }
 
 // Return nonzero if any element of M is not an integer.  Also extract
@@ -386,7 +386,7 @@
 bool
 NDArray::too_large_for_float (void) const
 {
-  return test_any (xtoo_large_for_float);
+  return test_any (octave::too_large_for_float);
 }
 
 // FIXME: this is not quite the right thing.