From f9ef721c854af12837f71becf3bd79740a2d5e69 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 28 Mar 2018 16:34:33 +1300 Subject: [PATCH] [honey] Eliminate SSIndex::n_index member --- xapian-core/backends/honey/honey_table.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/xapian-core/backends/honey/honey_table.h b/xapian-core/backends/honey/honey_table.h index 93fc0b485..9dbb7f3f2 100644 --- a/xapian-core/backends/honey/honey_table.h +++ b/xapian-core/backends/honey/honey_table.h @@ -298,7 +298,6 @@ class SSIndex { #elif defined SSINDEX_SKIPLIST size_t block = 0; #endif - size_t n_index = 0; #if defined SSINDEX_BINARY_CHOP || defined SSINDEX_SKIPLIST std::string last_index_key; #endif @@ -417,8 +416,6 @@ class SSIndex { #else # error "SSINDEX type not specified" #endif - - ++n_index; } off_t write(BufferedFile& fh) { @@ -445,7 +442,7 @@ class SSIndex { pointers = NULL; #elif defined SSINDEX_BINARY_CHOP // Fill in bytes 1 to 4 with the number of entries. - AssertEq(n_index, (data.size() - 5) / (SSINDEX_BINARY_CHOP_KEY_SIZE + 4)); + size_t n_index = (data.size() - 5) / (SSINDEX_BINARY_CHOP_KEY_SIZE + 4); data[1] = n_index >> 24; data[2] = n_index >> 16; data[3] = n_index >> 8; @@ -469,8 +466,6 @@ class SSIndex { if (parent_index) s += parent_index->size(); return s; } - - size_t get_num_entries() const { return n_index; } }; class HoneyCursor; -- 2.11.4.GIT