Mercurial > hg > octave-avbm
changeset 10546:f5b8b28917a2
Eliminate compile warning about explicit braces
warning: suggest explicit braces to avoid ambiguous 'else'
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 09:58:23 -0700 |
parents | ffe28cdc6fe2 |
children | af55e4a499e4 |
files | src/ChangeLog src/DLD-FUNCTIONS/regexp.cc |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-23 Rik <octave@nomad.inbox5.com> + + * DLD-FUNCTIONS/regexp.cc.: eliminate compile warning + warning: suggest explicit braces to avoid ambiguous 'else' + 2010-04-23 Jaroslav Hajek <highegg@gmail.com> * ov-base-scalar.h (octave_base_scalar::reshape,
--- a/src/DLD-FUNCTIONS/regexp.cc +++ b/src/DLD-FUNCTIONS/regexp.cc @@ -459,7 +459,7 @@ int pos_offset = 0; pos_match = 0; for (int i = 1; i < matches; i++) - if (ovector[2*i] >= 0 && ovector[2*i+1] > 0) + if (ovector[2*i] >= 0 && ovector[2*i+1] > 0) { if (i == 1 || ovector[2*i] != ovector[2*i-2] || ovector[2*i-1] != ovector[2*i+1]) { @@ -471,6 +471,7 @@ } else pos_offset++; + } m = std::string(*listptr); t = cell_t;