mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-26 10:59:23 -04:00
+ delete a pointer
This commit is contained in:
1 parent
3e24b168da
commit
dbbab7622e
2 files changed
+3
-2
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user