Mercurial > hg > octave-lojdl
changeset 2612:e2d1b073b78a
[project @ 1997-01-20 23:06:31 by jwe]
author | jwe |
---|---|
date | Mon, 20 Jan 1997 23:06:31 +0000 |
parents | 4474b4cf6cf6 |
children | 5bcee07be597 |
files | src/op-str-str.cc src/ops.h |
diffstat | 2 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/op-str-str.cc +++ b/src/op-str-str.cc @@ -50,21 +50,20 @@ if (cm2.rows () == 1 && cm2.columns () == 1) return octave_value (cm1 (0, 0) == cm2 (0, 0)); else - SC_MX_BOOL_OP (char, c, cm1 (0, 0), \ - charMatrix, m, cm2, \ + SC_MX_BOOL_OP (char, c, cm1 (0, 0), charMatrix, m, cm2, c == m (i, j), 0.0); } else { - if (cm2.rows () == 1 && cm2.columns () == 1) - MX_SC_BOOL_OP (charMatrix, m, cm1, \ - char, c, cm2 (0, 0), \ + int cm2_nr = cm2.rows (); + int cm2_nc = cm2.cols (); + + if (cm2_nr == 1 && cm2_nc == 1) + MX_SC_BOOL_OP (charMatrix, m, cm1, char, c, cm2 (0, 0), c == m (i, j), 0.0); else - MX_MX_BOOL_OP (charMatrix, m1, cm1, \ - charMatrix, m2, cm2, \ - m1 (i, j) == m2 (i, j), \ - "==", 0.0); + MX_MX_BOOL_OP (charMatrix, m1, cm1, charMatrix, m2, cm2, + m1 (i, j) == m2 (i, j), "==", 0.0); } }
--- a/src/ops.h +++ b/src/ops.h @@ -65,7 +65,7 @@ { \ BOOL_OP1 (st, sn, get_s, mt, mn, get_m) \ BOOL_OP2 (mn) \ - if (nr == 0|| nc == 0) \ + if (nr == 0 || nc == 0) \ return empty_result; \ BOOL_OP3 (test) \ } \ @@ -76,7 +76,7 @@ { \ BOOL_OP1 (mt, mn, get_m, st, sn, get_s) \ BOOL_OP2 (mn) \ - if (nr == 0|| nc == 0) \ + if (nr == 0 || nc == 0) \ return empty_result; \ BOOL_OP3 (test) \ } \