--- a/src/common/rclconfig.cpp
+++ b/src/common/rclconfig.cpp
@@ -35,6 +35,7 @@
#include <cstdlib>
#include <cstring>
+#include "cstr.h"
#include "pathut.h"
#include "rclconfig.h"
#include "conftree.h"
@@ -176,7 +177,7 @@
return;
m_ok = true;
- setKeyDir("");
+ setKeyDir(cstr_null);
m_stpsuffstate.init(this, mimemap, "recoll_noindex");
m_skpnstate.init(this, m_conf, "skippedNames");
@@ -199,7 +200,7 @@
m_rmtstate.init(this, 0, "indexedmimetypes");
return false;
}
- setKeyDir("");
+ setKeyDir(cstr_null);
bool nocjk = false;
if (getConfParam("nocjk", &nocjk) && nocjk == true) {
TextSplit::cjkProcessing(false);
@@ -348,7 +349,7 @@
} else {
// Note: it seems that all versions of iconv will take
// iso-8859. Some won't take iso8859
- localecharset = string("ISO-8859-1");
+ localecharset = string(cstr_iso_8859_1);
}
LOGDEB1(("RclConfig::getDefCharset: localecharset [%s]\n",
localecharset.c_str()));
@@ -377,7 +378,7 @@
sfields[i] = '\n';
// Parse the result with a confsimple and add the results to the metadata
ConfSimple conf(sfields, 1, true);
- list<string> nmlst = conf.getNames("");
+ list<string> nmlst = conf.getNames(cstr_null);
for (list<string>::const_iterator it = nmlst.begin();
it != nmlst.end(); it++) {
conf.get(*it, (*tgt)[*it]);
@@ -488,15 +489,15 @@
string RclConfig::getSuffixFromMimeType(const string &mt)
{
string suffix;
- list<string>sfs = mimemap->getNames("");
+ list<string>sfs = mimemap->getNames(cstr_null);
string mt1;
for (list<string>::const_iterator it = sfs.begin();
it != sfs.end(); it++) {
- if (mimemap->get(*it, mt1, ""))
+ if (mimemap->get(*it, mt1, cstr_null))
if (!stringicmp(mt, mt1))
return *it;
}
- return "";
+ return cstr_null;
}
/** Get list of file categories from mimeconf */
@@ -955,7 +956,7 @@
{
string hs;
- mimeconf->get(mtype, hs, "");
+ mimeconf->get(mtype, hs, cstr_null);
if (hs.empty())
return false;
list<string> tokens;
@@ -1205,7 +1206,7 @@
}
}
} else {
- config->setKeyDir("");
+ config->setKeyDir(cstr_null);
list<string> names = config->getConfNames();
names.sort();
names.unique();