changeset 8017:260294a5520f

octave_value::idx_type_value: move definition to ov.cc from ov.h
author John W. Eaton <jwe@octave.org>
date Thu, 07 Aug 2008 14:05:11 -0400
parents dca99c492134
children 8487847eb092
files src/ChangeLog src/ov.cc src/ov.h
diffstat 3 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Aug 07 01:16:50 2008 -0400
+++ b/src/ChangeLog	Thu Aug 07 14:05:11 2008 -0400
@@ -1,5 +1,8 @@
 2008-08-07  John W. Eaton  <jwe@octave.org>
 
+	* ov.cc (octave_value::idx_type_value): Move definition here.
+	* ov.h: From here.
+
 	* DLD-FUNCTIONS/fsolve.cc (override_options): Don't fail if
 	options_map does not contain an expected keyword.
 	Fix typo in warning identifier.
--- a/src/ov.cc	Thu Aug 07 01:16:50 2008 -0400
+++ b/src/ov.cc	Thu Aug 07 14:05:11 2008 -0400
@@ -1227,6 +1227,22 @@
   return rep->cell_value ();
 }
 
+// Define the idx_type_value function here instead of in ov.h to avoid
+// needing definitions for the SIZEOF_X macros in ov.h.
+
+octave_idx_type
+octave_value::idx_type_value (bool req_int = false,
+			      bool frc_str_conv = false) const
+{
+#if SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_LONG
+  return long_value (req_int, frc_str_conv);
+#elif SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_INT
+  return int_value (req_int, frc_str_conv);
+#else
+#error "no octave_value extractor for octave_idx_type"
+#endif
+}
+
 Octave_map
 octave_value::map_value (void) const
 {
--- a/src/ov.h	Thu Aug 07 01:16:50 2008 -0400
+++ b/src/ov.h	Thu Aug 07 14:05:11 2008 -0400
@@ -639,16 +639,7 @@
     { return rep->ulong_value (req_int, frc_str_conv); }
 
   octave_idx_type
-  idx_type_value (bool req_int = false, bool frc_str_conv = false) const
-    {
-#if SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_LONG
-      return long_value (req_int, frc_str_conv);
-#elif SIZEOF_OCTAVE_IDX_TYPE == SIZEOF_INT
-      return int_value (req_int, frc_str_conv);
-#else
-#error "no octave_value extractor for octave_idx_type"
-#endif
-    }
+  idx_type_value (bool req_int = false, bool frc_str_conv = false) const;
 
   double double_value (bool frc_str_conv = false) const
     { return rep->double_value (frc_str_conv); }