Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/words
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-07-01 23:15:19 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:20:14 +0300
commit09bb6f94112b3aec387f9781c3fffe37ea86bdc3 (patch)
treebf256013c6333326dba621cf3528aef7f929e2bf /words
parent233683d1670e89076c82401e2693315046c7244e (diff)
Minor code style fixes.
Diffstat (limited to 'words')
-rw-r--r--words/sloynik_engine.cpp6
-rw-r--r--words/sloynik_index.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/words/sloynik_engine.cpp b/words/sloynik_engine.cpp
index 137c0faee1..3c2c74fac3 100644
--- a/words/sloynik_engine.cpp
+++ b/words/sloynik_engine.cpp
@@ -13,11 +13,13 @@ sl::SloynikEngine::SloynikEngine(string const & dictionaryPath,
FileReader * pDicFileReader = new FileReader(dictionaryPath);
// m_pDictionary takes ownership of pDicFileReader.
m_pDictionary.reset(new sl::SlofDictionary(pDicFileReader));
+
vector<uint64_t> stamp;
stamp.push_back(strFn.m_PrimaryCompareId);
stamp.push_back(strFn.m_SecondaryCompareId);
stamp.push_back(m_pDictionary->KeyCount());
stamp.push_back(pDicFileReader->Size());
+
string const stampPath = indexPath + ".stamp";
bool needIndexBuild = false;
try
@@ -33,11 +35,13 @@ sl::SloynikEngine::SloynikEngine(string const & dictionaryPath,
needIndexBuild = true;
}
}
- catch (RootException &)
+ catch (RootException const &)
{
needIndexBuild = true;
}
+
LOG(LINFO, ("Started sloynik engine. Words in the dictionary:", m_pDictionary->KeyCount()));
+
// Uncomment to always rebuild the index: needIndexBuild = true;
if (needIndexBuild)
{
diff --git a/words/sloynik_index.cpp b/words/sloynik_index.cpp
index b2399d2e39..41bbdb97f5 100644
--- a/words/sloynik_index.cpp
+++ b/words/sloynik_index.cpp
@@ -1,12 +1,15 @@
#include "sloynik_index.hpp"
#include "dictionary.hpp"
+
#include "../coding/file_writer.hpp"
+#include "../coding/timsort/timsort.hpp"
+
#include "../base/assert.hpp"
#include "../base/logging.hpp"
#include "../base/cache.hpp"
+
#include "../std/bind.hpp"
-#include "../coding/timsort/timsort.hpp"
#define FILE_SORTER_LOG_BATCH_SIZE 11