octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sun C++ - Array.cc & Sparse.cc errors


From: John W. Eaton
Subject: Sun C++ - Array.cc & Sparse.cc errors
Date: Mon, 8 Nov 2010 11:45:49 -0500

On  8-Nov-2010, John W. Eaton wrote:

| Does the following change help?

Oops, here is the suggested change.

If this does fix the problem but you find additional locations where a
change like this is needed, please send diffs, or at least the
locations where the change is required.

Also, it would be helpful to us if you could try compiling the current
development sources (or at least the most recent snapshot) with Sun
C++ so we could possibly fix any problems before the upcoming release
of Octave 3.4.

Thanks,

jwe

diff --git a/liboctave/Array.cc b/liboctave/Array.cc
--- a/liboctave/Array.cc
+++ b/liboctave/Array.cc
@@ -1970,7 +1970,7 @@
   if (n <= 1)
     return mode ? mode : ASCENDING;
 
-  if (! mode)
+  if (mode == UNSORTED)
     {
       // Auto-detect mode.
       compare_fcn_type compare
@@ -1982,7 +1982,7 @@
         mode = ASCENDING;
     }
 
-  if (mode)
+  if (mode != UNSORTED)
     {
       lsort.set_compare (safe_comparator (mode, *this, false));
 
@@ -2023,7 +2023,7 @@
   if (r <= 1 || c == 0)
     return mode ? mode : ASCENDING;
 
-  if (! mode)
+  if (mode == UNSORTED)
     {
       // Auto-detect mode.
       compare_fcn_type compare
@@ -2054,11 +2054,11 @@
                 mode = DESCENDING;
             }
         }
-      if (! mode && i == cols ())
+      if (mode == UNSORTED && i == cols ())
         mode = ASCENDING;
     }
 
-  if (mode)
+  if (mode != UNSORTED)
     {
       lsort.set_compare (safe_comparator (mode, *this, false));
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]