From 71c3bda0cc6a12cd068eb617df973f9c6ff15976 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Thu, 24 Mar 2011 11:26:58 +0000 Subject: [PATCH] + remove a few compile warnings --- src/common/kiwix/indexer.h | 4 ++-- src/common/kiwix/searcher.cpp | 7 +++++-- src/common/kiwix/searcher.h | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/common/kiwix/indexer.h b/src/common/kiwix/indexer.h index 040c62008..c53901e74 100644 --- a/src/common/kiwix/indexer.h +++ b/src/common/kiwix/indexer.h @@ -75,8 +75,8 @@ namespace kiwix { float stepSize; /* Boost factor */ - const unsigned int keywordsBoostFactor; - inline const unsigned int getTitleBoostFactor(const unsigned int contentLength) { + unsigned int keywordsBoostFactor; + inline unsigned int getTitleBoostFactor(const unsigned int contentLength) { return contentLength / 500 + 1; } }; diff --git a/src/common/kiwix/searcher.cpp b/src/common/kiwix/searcher.cpp index 95815fc66..1943557ac 100644 --- a/src/common/kiwix/searcher.cpp +++ b/src/common/kiwix/searcher.cpp @@ -37,9 +37,12 @@ namespace kiwix { /* Constructor */ Searcher::Searcher() : - estimatedResultCount(0), resultTemplatePath(""), - searchPattern("") { + searchPattern(""), + resultCountPerPage(0), + estimatedResultCount(0), + resultStart(0), + resultEnd(0) { } /* Search strings in the database */ diff --git a/src/common/kiwix/searcher.h b/src/common/kiwix/searcher.h index 41ff24faa..bffe00ce4 100644 --- a/src/common/kiwix/searcher.h +++ b/src/common/kiwix/searcher.h @@ -82,11 +82,11 @@ namespace kiwix { std::vector results; std::vector::iterator resultOffset; std::string resultTemplatePath; + std::string searchPattern; unsigned int resultCountPerPage; + unsigned int estimatedResultCount; unsigned int resultStart; unsigned int resultEnd; - unsigned int estimatedResultCount; - std::string searchPattern; }; }