diff src/DLD-FUNCTIONS/lookup.cc @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents 57632dea2446
children 4d777e05d47c
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/lookup.cc	Thu Jan 20 17:21:27 2011 -0500
+++ b/src/DLD-FUNCTIONS/lookup.cc	Thu Jan 20 17:24:59 2011 -0500
@@ -44,7 +44,7 @@
 bool
 contains_char (const std::string& str, char c)
 {
-  return (str.find (c) != std::string::npos 
+  return (str.find (c) != std::string::npos
           || str.find (std::toupper (c)) != std::string::npos);
 }
 
@@ -68,7 +68,7 @@
 static bool
 stri_comp_lt (const std::string& a, const std::string& b)
 {
-  return std::lexicographical_compare (a.begin (), a.end (), 
+  return std::lexicographical_compare (a.begin (), a.end (),
                                        b.begin (), b.end (),
                                        icmp_char_lt());
 }
@@ -77,14 +77,14 @@
 static bool
 stri_comp_gt (const std::string& a, const std::string& b)
 {
-  return std::lexicographical_compare (a.begin (), a.end (), 
+  return std::lexicographical_compare (a.begin (), a.end (),
                                        b.begin (), b.end (),
                                        icmp_char_gt());
 }
 #endif
 
 template <class T>
-inline sortmode 
+inline sortmode
 get_sort_mode (const Array<T>& array,
                typename octave_sort<T>::compare_fcn_type desc_comp
                = octave_sort<T>::descending_compare)
@@ -97,7 +97,7 @@
 }
 
 // FIXME: perhaps there should be octave_value::lookup?
-// The question is, how should it behave w.r.t. the second argument's type. 
+// The question is, how should it behave w.r.t. the second argument's type.
 // We'd need a dispatch on two arguments. Hmmm...
 
 #define INT_ARRAY_LOOKUP(TYPE) \
@@ -108,7 +108,7 @@
                                 match_idx, match_bool);
 template <class ArrayT>
 static octave_value
-do_numeric_lookup (const ArrayT& array, const ArrayT& values, 
+do_numeric_lookup (const ArrayT& array, const ArrayT& values,
                    bool left_inf, bool right_inf,
                    bool match_idx, bool match_bool)
 {
@@ -141,7 +141,7 @@
               ridx.xelem (i) = (j != 0 && values(i) == array(j-1)) ? j : 0;
             }
 
-          retval = ridx; 
+          retval = ridx;
         }
       else if (left_inf && right_inf)
         {
@@ -233,7 +233,7 @@
 the rightmost subinterval shall be extended to infinity (i.e., all indices\n\
 at most n-1).\n\
 @end table\n\
-@end deftypefn") 
+@end deftypefn")
 {
   octave_value retval;
 
@@ -282,12 +282,12 @@
   if (error_state)
     return retval;
 
-  if (num_case) 
+  if (num_case)
     {
 
       // In the case of a complex array, absolute values will be used for compatibility
       // (though it's not too meaningful).
-      
+
       if (table.is_complex_type ())
         table = table.abs ();
 
@@ -347,7 +347,7 @@
 
           retval = match;
         }
-      else if (match_idx) 
+      else if (match_idx)
         {
           NDArray ridx (idx.dims ());
           if (match_idx)
@@ -369,7 +369,7 @@
 
   return retval;
 
-}  
+}
 
 /*
 %!assert (lookup(1:3, 0.5), 0)     # value before table