cld2: fix HAVE_CLD2 test
It _is_ defined (as 0) when there is no CLD2.
This commit is contained in:
@ -591,7 +591,7 @@ process_message(const MimeMessage& mime_msg, const std::string& path,
|
|||||||
if (info.mailing_list)
|
if (info.mailing_list)
|
||||||
info.flags |= Flags::MailingList;
|
info.flags |= Flags::MailingList;
|
||||||
|
|
||||||
#ifdef HAVE_CLD2
|
#if HAVE_CLD2
|
||||||
/* language detection requires the cld2 lib */
|
/* language detection requires the cld2 lib */
|
||||||
if (info.body_txt) { /* attempt to get the body-language */
|
if (info.body_txt) { /* attempt to get the body-language */
|
||||||
if (const auto lang{detect_language(info.body_txt.value())}; lang) {
|
if (const auto lang{detect_language(info.body_txt.value())}; lang) {
|
||||||
|
|||||||
@ -148,7 +148,7 @@ I said: "Aujourd'hui!"
|
|||||||
"to:sqlite-dev@sqlite.org",
|
"to:sqlite-dev@sqlite.org",
|
||||||
"list:sqlite-dev.sqlite.org",
|
"list:sqlite-dev.sqlite.org",
|
||||||
"aujourd'hui",
|
"aujourd'hui",
|
||||||
#ifdef HAVE_CLD2
|
#if HAVE_CLD2
|
||||||
"lang:en",
|
"lang:en",
|
||||||
#endif /*HAVE_CLD2*/
|
#endif /*HAVE_CLD2*/
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
using namespace Mu;
|
using namespace Mu;
|
||||||
|
|
||||||
#ifndef HAVE_CLD2
|
#if HAVE_CLD2
|
||||||
// Dummy implementation
|
// Dummy implementation
|
||||||
Option<Language> Mu::detect_language(const std::string& txt) { return Nothing; }
|
Option<Language> Mu::detect_language(const std::string& txt) { return Nothing; }
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -139,7 +139,7 @@ test_mu_query_01(void)
|
|||||||
{ "", 19 },
|
{ "", 19 },
|
||||||
{"msgid:abcd$efgh@example.com", 1},
|
{"msgid:abcd$efgh@example.com", 1},
|
||||||
{"i:abcd$efgh@example.com", 1},
|
{"i:abcd$efgh@example.com", 1},
|
||||||
#ifdef HAVE_CLD2
|
#if HAVE_CLD2
|
||||||
{ "lang:en", 14},
|
{ "lang:en", 14},
|
||||||
#endif /*HAVE_CLD2*/
|
#endif /*HAVE_CLD2*/
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user