cld2: fix HAVE_CLD2 test

It _is_ defined (as 0) when there is no CLD2.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-23 16:14:04 +03:00
committed by Seth Ladygo
parent ffa110d08d
commit 91ad1c4478
4 changed files with 4 additions and 4 deletions

View File

@ -591,7 +591,7 @@ process_message(const MimeMessage& mime_msg, const std::string& path,
if (info.mailing_list)
info.flags |= Flags::MailingList;
#ifdef HAVE_CLD2
#if HAVE_CLD2
/* language detection requires the cld2 lib */
if (info.body_txt) { /* attempt to get the body-language */
if (const auto lang{detect_language(info.body_txt.value())}; lang) {

View File

@ -148,7 +148,7 @@ I said: "Aujourd'hui!"
"to:sqlite-dev@sqlite.org",
"list:sqlite-dev.sqlite.org",
"aujourd'hui",
#ifdef HAVE_CLD2
#if HAVE_CLD2
"lang:en",
#endif /*HAVE_CLD2*/
}) {

View File

@ -21,7 +21,7 @@
using namespace Mu;
#ifndef HAVE_CLD2
#if HAVE_CLD2
// Dummy implementation
Option<Language> Mu::detect_language(const std::string& txt) { return Nothing; }
#else