Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/regexp.cc @ 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 | fcafe0e9bd58 |
children | c48b7048e720 |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/regexp.cc Fri Apr 23 11:42:58 2010 +0200 +++ b/src/DLD-FUNCTIONS/regexp.cc Fri Apr 23 09:58:23 2010 -0700 @@ -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;