# HG changeset patch # User John W. Eaton # Date 1218132311 14400 # Node ID 260294a5520f1c3107b21e93b3fa86cbbc8f9eae # Parent dca99c4921348857c8fc69c649d02a123f21494d octave_value::idx_type_value: move definition to ov.cc from ov.h diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-08-07 John W. Eaton + * 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. diff --git a/src/ov.cc b/src/ov.cc --- a/src/ov.cc +++ b/src/ov.cc @@ -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 { diff --git a/src/ov.h b/src/ov.h --- a/src/ov.h +++ b/src/ov.h @@ -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); }