commit d32616e2aeb90a14347c42bb953ec09a489a1b56 Author: Tanmai Khanna Date: Sat May 9 19:25:26 2020 +0530 remove use of flag diff --git a/apertium/transfer.cc b/apertium/transfer.cc index 96220bf..eff15a4 100644 --- a/apertium/transfer.cc +++ b/apertium/transfer.cc @@ -2437,8 +2437,6 @@ void Transfer::applyWord(wstring const &word_str) { ms.step(L'^'); - - int secondary_flag = 0; //flag to recognise secondary tags for(unsigned int i = 0, limit = word_str.size(); i < limit; i++) { @@ -2456,11 +2454,12 @@ Transfer::applyWord(wstring const &word_str) case L'<': for(unsigned int j = i+1; j != limit; j++) { - if(word_str[j] == L':') //if secondary tags reached, discard current tag + if(word_str[j] == L':') //if secondary tags reached, discard current tag and stop processing word { - secondary_flag = 1; + i = limit; break; } + if(word_str[j] == L'>') { int symbol = alphabet(word_str.substr(i, j-i+1)); @@ -2482,9 +2481,6 @@ Transfer::applyWord(wstring const &word_str) ms.step(towlower(word_str[i]), any_char); break; } - - if(secondary_flag == 1) - break; //stop processing word if secondary tags reached } ms.step(L'$'); }