# HG changeset patch # User Jaroslav Hajek # Date 1223294556 -7200 # Node ID da48d2ca096fe014bf42bd08b9674e1d80fd2b61 # Parent 6c08e3921d3e1931e3e201f958de59fe1db51dc2 small fixes in oct-lookup.h diff -r 6c08e3921d3e -r da48d2ca096f liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Oct 03 13:04:14 2008 +0200 +++ b/liboctave/ChangeLog Mon Oct 06 14:02:36 2008 +0200 @@ -1,3 +1,7 @@ +2008-10-06 Jaroslav Hajek + + * oct-lookup.h: Mark functions inline. Add missing std:: qualifiers. + 2008-10-03 Jaroslav Hajek * Array.h (Array::maybe_delete_elements): Remove rfv argument from diff -r 6c08e3921d3e -r da48d2ca096f liboctave/oct-lookup.h --- a/liboctave/oct-lookup.h Fri Oct 03 13:04:14 2008 +0200 +++ b/liboctave/oct-lookup.h Mon Oct 06 14:02:36 2008 +0200 @@ -32,7 +32,7 @@ // a simple binary lookup template -octave_idx_type +inline octave_idx_type bin_lookup (const T *table, octave_idx_type size, const T& val, bpred comp) @@ -42,7 +42,7 @@ // version using < operator template -octave_idx_type +inline octave_idx_type bin_lookup (const T *table, octave_idx_type size, const T& val) { @@ -72,14 +72,14 @@ // bind2nd (less(), a), // not1 (bind2nd (less(), b))) template -out_range +inline out_range chk_out_range (const T& a, const T& b, bpred comp) { return out_range (a, b, comp); } template -void +inline void seq_lookup (const T *table, octave_idx_type offset, octave_idx_type size, const T *vals, octave_idx_type nvals, octave_idx_type *idx, bpred comp) @@ -125,11 +125,11 @@ else // special case: lowermost range (-Inf, min) vnew = std::find_if (vcur, vend, - not1 (bind2nd (comp, *cur))); + std::not1 (std::bind2nd (comp, *cur))); else // special case: uppermost range [max, Inf) vnew = std::find_if (vcur, vend, - bind2nd (comp, *(cur-1))); + std::bind2nd (comp, *(cur-1))); // store index of the current interval. std::fill_n (idx, vnew - vcur, cur - table); @@ -142,7 +142,7 @@ // overload using < operator template -void +inline void seq_lookup (const T *table, octave_idx_type offset, octave_idx_type size, const T *vals, octave_idx_type nvals, octave_idx_type *idx) @@ -152,14 +152,14 @@ // helper functions - determine whether an array is descending template -bool +inline bool is_descending (const T *table, octave_idx_type size) { return size > 1 && table[size-1] < table[0]; } template -bool +inline bool is_descending (const T *table, octave_idx_type size, bpred comp) {