mirror of https://github.com/kiwix/libkiwix.git
+ delete a pointer
This commit is contained in:
parent
3e24b168da
commit
dbbab7622e
|
@ -33,7 +33,7 @@ namespace kiwix {
|
|||
}
|
||||
return numWords;
|
||||
}
|
||||
|
||||
|
||||
/* Constructor */
|
||||
Indexer::Indexer() :
|
||||
keywordsBoostFactor(3),
|
||||
|
@ -225,7 +225,7 @@ namespace kiwix {
|
|||
}
|
||||
|
||||
/* Make a hard-disk flush every 10.000 articles */
|
||||
if (indexedArticleCount % 5000 == 0) {
|
||||
if (indexedArticleCount % 500 == 0) {
|
||||
self->flush();
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ std::string kiwix::removeAccents(const std::string &text) {
|
|||
Transliterator *removeAccentsTrans = Transliterator::createInstance("Lower; NFD; [:M:] remove; NFC", UTRANS_FORWARD, status);
|
||||
UnicodeString ustring = UnicodeString(text.c_str());
|
||||
removeAccentsTrans->transliterate(ustring);
|
||||
delete removeAccentsTrans;
|
||||
std::string unaccentedText;
|
||||
ustring.toUTF8String(unaccentedText);
|
||||
return unaccentedText;
|
||||
|
|
Loading…
Reference in New Issue