diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-26 22:23:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-27 12:34:24 +0100 |
commit | dd32608012fdd017ab8ad303cca2453f2f8dcbd7 (patch) | |
tree | 3c4a2368a091e66c6e013b56ff08836c456833df | |
parent | 3d3c70f969d7305ed1712e85c0979772074a4ed2 (diff) |
fix mangled indent
-rw-r--r-- | lingucomponent/source/languageguessing/simpleguesser.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx index 53279f89ce6f..eab9f2ae16a6 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.cxx +++ b/lingucomponent/source/languageguessing/simpleguesser.cxx @@ -114,37 +114,37 @@ SimpleGuesser::~SimpleGuesser() */ vector<Guess> SimpleGuesser::GuessLanguage(char* text) { - vector<Guess> guesses; + vector<Guess> guesses; - if(!h){return guesses;} + if (!h) + return guesses; - //calculate le number of unicode charcters (symbols) - int len = utfstrlen(text); + //calculate le number of unicode charcters (symbols) + int len = utfstrlen(text); - if( len > MAX_STRING_LENGTH_TO_ANALYSE ){len = MAX_STRING_LENGTH_TO_ANALYSE ;} + if (len > MAX_STRING_LENGTH_TO_ANALYSE) + len = MAX_STRING_LENGTH_TO_ANALYSE; - char *guess_list = textcat_Classify(h, text, len); + char *guess_list = textcat_Classify(h, text, len); - if(strcmp(guess_list, _TEXTCAT_RESULT_SHORT) == 0){ - return guesses; - } + if (strcmp(guess_list, _TEXTCAT_RESULT_SHORT) == 0) + return guesses; - int current_pointer = 0; + int current_pointer = 0; - for(int i = 0; guess_list[current_pointer] != '\0'; i++) + for(int i = 0; guess_list[current_pointer] != '\0'; i++) + { + while(guess_list[current_pointer] != GUESS_SEPARATOR_OPEN && guess_list[current_pointer] != '\0') + current_pointer++; + if(guess_list[current_pointer] != '\0') { - while(guess_list[current_pointer] != GUESS_SEPARATOR_OPEN && guess_list[current_pointer] != '\0'){ - current_pointer++; - } - if(guess_list[current_pointer] != '\0') - { - Guess g((char*)(guess_list + current_pointer)); + Guess g((char*)(guess_list + current_pointer)); - guesses.push_back(g); + guesses.push_back(g); - current_pointer++; - } + current_pointer++; } + } return guesses; } |