changeset 4722:8f892ca5851d

[project @ 2004-01-23 14:22:37 by jwe]
author jwe
date Fri, 23 Jan 2004 14:22:37 +0000
parents e4bb40821934
children ccb4eca28f7e
files src/ChangeLog src/ov-cell.cc
diffstat 2 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 01 20:51:55 2008 -0500
+++ b/src/ChangeLog	Fri Jan 23 14:22:37 2004 +0000
@@ -1,3 +1,8 @@
+2004-01-23  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* ov-cell.cc (all_strings): Always compute total required length
+	of retval.
+
 2004-01-22  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* error.cc (pr_where): New arg, print_code with default value true.
--- a/src/ov-cell.cc	Fri Feb 01 20:51:55 2008 -0500
+++ b/src/ov-cell.cc	Fri Jan 23 14:22:37 2004 +0000
@@ -280,24 +280,21 @@
 
   int max_len = 0;
 
-  if (pad)
+  for (int j = 0; j < nc; j++)
     {
-      for (int j = 0; j < nc; j++)
+      for (int i = 0; i < nr; i++)
 	{
-	  for (int i = 0; i < nr; i++)
-	    {
-	      string_vector s = matrix(i,j).all_strings ();
+	  string_vector s = matrix(i,j).all_strings ();
 
-	      if (error_state)
-		return retval;
+	  if (error_state)
+	    return retval;
 
-	      n_elts += s.length ();
+	  n_elts += s.length ();
 
-	      int s_max_len = s.max_length ();
+	  int s_max_len = s.max_length ();
 
-	      if (s_max_len > max_len)
-		max_len = s_max_len;
-	    }
+	  if (s_max_len > max_len)
+	    max_len = s_max_len;
 	}
     }
 
@@ -326,8 +323,6 @@
 	}
     }
 
-
-
   return retval;
 }