Mercurial > octave-dspies
diff libinterp/corefcn/find.cc @ 18793: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 | a5286fb173cd |
children | 03c2671493f9 |
line wrap: on
line diff
--- a/libinterp/corefcn/find.cc Mon Jun 02 10:05:25 2014 -0700 +++ b/libinterp/corefcn/find.cc Mon Jun 02 11:04:55 2014 -0700 @@ -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);