changeset 18981:332450e56698 gui-release

Fix compilation warning about use of '&' versus '&&' in find.cc. * find.cc (find_nonzero_elem_idx): Fix compilation warning about use of '&' versus '&&' in find.cc.
author Rik <rik@octave.org>
date Mon, 02 Jun 2014 11:04:55 -0700
parents 99d63a2e221b
children 03c2671493f9 d67f33a4009d
files libinterp/corefcn/find.cc
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/find.cc
+++ b/libinterp/corefcn/find.cc
@@ -183,7 +183,7 @@
     {
       // No items found.  Fixup return dimensions for Matlab compatibility.
       // The behavior to match is documented in Array.cc (Array<T>::find).
-      if ((nr == 0 && nc == 0) || nr == 1 & nc == 1)
+      if ((nr == 0 && nc == 0) || (nr == 1 && nc == 1))
         {
           idx.resize (0, 0);
 
@@ -294,12 +294,13 @@
     }
   else
     {
-      // FIXME: Is this case even possible?  A scalar permutation matrix seems to devolve
-      //        to a scalar full matrix, at least from the Octave command line.  Perhaps
-      //        this function could be called internally from C++ with such a matrix.
+      // FIXME: Is this case even possible?  A scalar permutation matrix seems
+      // to devolve to a scalar full matrix, at least from the Octave command
+      // line.  Perhaps this function could be called internally from C++ with
+      // such a matrix.
       // No items found.  Fixup return dimensions for Matlab compatibility.
       // The behavior to match is documented in Array.cc (Array<T>::find).
-      if ((nr == 0 && nc == 0) || nr == 1 & nc == 1)
+      if ((nr == 0 && nc == 0) || (nr == 1 && nc == 1))
         {
           idx.resize (0, 0);