Get recoll to compile with clang (on freebsd) and eliminate warnings. You can no build recoll with make CXX=clang LINK=clang

This commit is contained in:
Jean-Francois Dockes
2012-05-20 17:35:03 +02:00
parent cbe7fd21cb
commit f34994d882
13 changed files with 42 additions and 31 deletions
+9 -2
View File
@@ -57,14 +57,21 @@ static const string& docfToDatf(const string& df)
// special processing for special fields like dates and sizes. User
// custom field data will have to be processed before insertion to
// achieve equivalent results.
#if XAPIAN_MAJOR_VERSION == 1 && XAPIAN_MINOR_VERSION < 2
class QSorter : public Xapian::Sorter {
#else
class QSorter : public Xapian::KeyMaker {
#endif
public:
QSorter(const string& f)
: m_fld(docfToDatf(f) + "=")
{
m_ismtime = !m_fld.compare("dmtime=");
m_issize = !m_fld.compare("fbytes=") || !m_fld.compare("dbytes=") ||
!m_fld.compare("pcbytes=");
if (m_ismtime)
m_issize = false;
else
m_issize = !m_fld.compare("fbytes=") || !m_fld.compare("dbytes=") ||
!m_fld.compare("pcbytes=");
}
virtual std::string operator()(const Xapian::Document& xdoc) const