Skip to content

Commit

Permalink
xapian_wrap.cpp: resolve clang-tidy: bugprone-narrowing-conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
rsto committed Sep 4, 2024
1 parent c6d42dd commit 0954592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imap/xapian_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ static int xapian_db_init(xapian_db_t *db, int is_inmemory)
if (!is_inmemory) {
// Determine stemmer languages (in addition to English).
std::map<const std::string, unsigned> lang_counts;
size_t total_doccount = 0;
unsigned total_doccount = 0;
for (const Xapian::Database& subdb : *db->subdbs) {
read_language_counts(subdb, lang_counts);
total_doccount += subdb.get_doccount();
Expand Down Expand Up @@ -2092,7 +2092,7 @@ xapian_query_new_match(const xapian_db_t *db, int partnum, const char *str)
return NULL;
}

int min_version = *db->db_versions->begin();
unsigned min_version = *db->db_versions->begin();
if (min_version < XAPIAN_DB_MIN_SUPPORTED_VERSION) {
xsyslog(LOG_WARNING,
"deprecated database version, reindex required",
Expand All @@ -2101,7 +2101,7 @@ xapian_query_new_match(const xapian_db_t *db, int partnum, const char *str)
db->paths->c_str());
}

int max_version = *db->db_versions->rbegin();
unsigned max_version = *db->db_versions->rbegin();

Xapian::Query *q = NULL;
if (max_version >= 17) {
Expand Down

0 comments on commit 0954592

Please sign in to comment.