diff liboctave/numeric/lo-mappers.h @ 23619:6ed4d6e306ba

maint: Deprecate is_NA and replace with isna. * lo-mappers.h (is_NA): Use OCTAVE_DEPRECATED macro around function. * lo-mappers.h (isna): New function. * lo-mappers.h (octave_is_NA): Change message for this already deprecated function to say that replacement is octave::math::isna. * pr-output.cc, ov-complex.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.cc, lo-mappers.cc: Replace instances of is_NA with isna.
author Rik <rik@octave.org>
date Fri, 16 Jun 2017 11:50:50 -0700
parents be7b884ac589
children bd77ab816e43
line wrap: on
line diff
--- a/liboctave/numeric/lo-mappers.h	Fri Jun 16 09:03:10 2017 -0700
+++ b/liboctave/numeric/lo-mappers.h	Fri Jun 16 11:50:50 2017 -0700
@@ -37,11 +37,21 @@
 {
   namespace math
   {
-    extern OCTAVE_API bool is_NA (double x);
-    extern OCTAVE_API bool is_NA (float x);
+    extern OCTAVE_API bool isna (double x);
+    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
+    inline bool is_NA (double x) { return octave::math::isna (x); }
+
+    extern OCTAVE_API bool isna (float x);
+    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
+    inline bool is_NA (float x) { return octave::math::isna (x); }
 
-    extern OCTAVE_API bool is_NA (const Complex& x);
-    extern OCTAVE_API bool is_NA (const FloatComplex& x);
+    extern OCTAVE_API bool isna (const Complex& x);
+    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
+    inline bool is_NA (const Complex& x) { return octave::math::isna (x); }
+
+    extern OCTAVE_API bool isna (const FloatComplex& x);
+    OCTAVE_DEPRECATED (4.4, "use 'octave::math::isna' instead")
+    inline bool is_NA (const FloatComplex& x) { return octave::math::isna (x); }
 
     extern OCTAVE_API bool is_NaN_or_NA (const Complex& x);
     extern OCTAVE_API bool is_NaN_or_NA (const FloatComplex& x);
@@ -512,16 +522,16 @@
 
 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
 
-OCTAVE_DEPRECATED (4.2, "use 'octave::math::is_NA' instead")
-inline bool octave_is_NA (double x) { return octave::math::is_NA (x); }
-OCTAVE_DEPRECATED (4.2, "use 'octave::math::is_NA' instead")
-inline bool octave_is_NA (float x) { return octave::math::is_NA (x); }
-OCTAVE_DEPRECATED (4.2, "use 'octave::math::is_NA' instead")
-inline bool octave_is_NA (const Complex& x) { return octave::math::is_NA (x); }
-OCTAVE_DEPRECATED (4.2, "use 'octave::math::is_NA' instead")
+OCTAVE_DEPRECATED (4.2, "use 'octave::math::isna' instead")
+inline bool octave_is_NA (double x) { return octave::math::isna (x); }
+OCTAVE_DEPRECATED (4.2, "use 'octave::math::isna' instead")
+inline bool octave_is_NA (float x) { return octave::math::isna (x); }
+OCTAVE_DEPRECATED (4.2, "use 'octave::math::isna' instead")
+inline bool octave_is_NA (const Complex& x) { return octave::math::isna (x); }
+OCTAVE_DEPRECATED (4.2, "use 'octave::math::isna' instead")
 inline bool octave_is_NA (const FloatComplex& x)
 {
-  return octave::math::is_NA (x);
+  return octave::math::isna (x);
 }
 
 OCTAVE_DEPRECATED (4.2, "use 'octave::math::acos' instead")