diff src/Cell.cc @ 10315:57a59eae83cc

untabify src C++ source files
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:41:46 -0500
parents cd96d29c5efa
children 12884915a8e4
line wrap: on
line diff
--- a/src/Cell.cc
+++ b/src/Cell.cc
@@ -47,18 +47,18 @@
       resize (dim_vector (n, 1));
 
       for (octave_idx_type i = 0; i < n; i++)
-	{
-	  std::string s = sv[i];
+        {
+          std::string s = sv[i];
 
-	  if (trim)
-	    {
-	      size_t pos = s.find_last_not_of (' ');
+          if (trim)
+            {
+              size_t pos = s.find_last_not_of (' ');
 
-	      s = (pos == std::string::npos) ? "" : s.substr (0, pos+1);
-	    }
+              s = (pos == std::string::npos) ? "" : s.substr (0, pos+1);
+            }
 
-	  elem(i,0) = s;
-	}
+          elem(i,0) = s;
+        }
     }
 }
 
@@ -89,18 +89,18 @@
       octave_idx_type len = n > m ? m : n;
 
       for (octave_idx_type i = 0; i < len; i++)
-	{
-	  std::string s = sv[i];
+        {
+          std::string s = sv[i];
 
-	  if (trim)
-	    {
-	      size_t pos = s.find_last_not_of (' ');
+          if (trim)
+            {
+              size_t pos = s.find_last_not_of (' ');
 
-	      s = (pos == std::string::npos) ? "" : s.substr (0, pos+1);
-	    }
+              s = (pos == std::string::npos) ? "" : s.substr (0, pos+1);
+            }
 
-	  elem(i) = s;
-	}
+          elem(i) = s;
+        }
     }
 }
 
@@ -114,10 +114,10 @@
   for (octave_idx_type i = 0; i < n; i++)
     {
       if (! elem(i).is_string ())
-	{
-	  retval = false;
-	  break;
-	}
+        {
+          retval = false;
+          break;
+        }
     }
 
   return retval;
@@ -151,42 +151,42 @@
 
     case 1:
       {
-	idx_vector i = idx_arg(0).index_vector ();
+        idx_vector i = idx_arg(0).index_vector ();
 
-	if (! error_state)
-	  retval = Array<octave_value>::index (i, resize_ok, resize_fill_value ());
+        if (! error_state)
+          retval = Array<octave_value>::index (i, resize_ok, resize_fill_value ());
       }
       break;
 
     case 2:
       {
-	idx_vector i = idx_arg(0).index_vector ();
+        idx_vector i = idx_arg(0).index_vector ();
 
-	if (! error_state)
-	  {
-	    idx_vector j = idx_arg(1).index_vector ();
+        if (! error_state)
+          {
+            idx_vector j = idx_arg(1).index_vector ();
 
-	    if (! error_state)
-	      retval = Array<octave_value>::index (i, j, resize_ok,
+            if (! error_state)
+              retval = Array<octave_value>::index (i, j, resize_ok,
                                                     resize_fill_value ());
-	  }
+          }
       }
       break;
 
     default:
       {
-	Array<idx_vector> iv (n);
+        Array<idx_vector> iv (n);
 
-	for (octave_idx_type i = 0; i < n; i++)
-	  {
-	    iv(i) = idx_arg(i).index_vector ();
+        for (octave_idx_type i = 0; i < n; i++)
+          {
+            iv(i) = idx_arg(i).index_vector ();
 
-	    if (error_state)
-	      break;
-	  }
+            if (error_state)
+              break;
+          }
 
-	if (!error_state)
-	  retval = Array<octave_value>::index (iv, resize_ok,
+        if (!error_state)
+          retval = Array<octave_value>::index (iv, resize_ok,
                                                 resize_fill_value ());
       }
       break;
@@ -197,7 +197,7 @@
 
 Cell&
 Cell::assign (const octave_value_list& idx_arg, const Cell& rhs,
-	      const octave_value& fill_val)
+              const octave_value& fill_val)
 
 {
   octave_idx_type len = idx_arg.length ();
@@ -243,16 +243,16 @@
   if (ndims () < 3)
     {
       if (i < 0 || i >= cols ())
-	error ("invalid column selection");
+        error ("invalid column selection");
       else
-	{
-	  octave_idx_type nr = rows ();
+        {
+          octave_idx_type nr = rows ();
 
-	  retval.resize (dim_vector (nr, 1));
+          retval.resize (dim_vector (nr, 1));
 
-	  for (octave_idx_type j = 0; j < nr; j++)
-	    retval.xelem (j) = elem (j, i);
-	}
+          for (octave_idx_type j = 0; j < nr; j++)
+            retval.xelem (j) = elem (j, i);
+        }
     }
   else
     error ("Cell::column: requires 2-d cell array");