diff --git a/src/common/unaccent.cpp b/src/common/unaccent.cpp index a504ef5a6..5822e32fe 100644 --- a/src/common/unaccent.cpp +++ b/src/common/unaccent.cpp @@ -4,18 +4,17 @@ using namespace std; /* Remove accent */ std::string removeAccents(const char *text = NULL) { - char* out = NULL; + char* out = 0; size_t out_length = 0; if (!unac_string("UTF8", text, strlen(text), &out, &out_length)) { - std::string textWithoutAccent = text; - textWithoutAccent = string(out, out_length); + std::string textWithoutAccent = string(out, out_length); free(out); return textWithoutAccent; } if (text != NULL) { - return string(text); + return text; } return "";