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
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-01-18 22:16:56 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:10:32 +0300
commit6cc76d9993e64d0f6d50487b1ec730f2d58b43c5 (patch)
treeea797fdb9a5ecc2a222d280f8567711a1ef1df07 /indexer/index_builder.cpp
parent541b5ec5d86f49f92a4a9d8ec119774ae71e0f55 (diff)
Make saved middle point in mwm for optimal storing of geometry's first points.
!Note! Changes (HEADER_FILE_TAG) in feature_sorter.cpp can reproduce ugly bug.
Diffstat (limited to 'indexer/index_builder.cpp')
-rw-r--r--indexer/index_builder.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indexer/index_builder.cpp b/indexer/index_builder.cpp
index a2cd96b5d9..b2be291f1b 100644
--- a/indexer/index_builder.cpp
+++ b/indexer/index_builder.cpp
@@ -17,8 +17,11 @@ namespace indexer
FeaturesVector featuresVector(readCont);
FilesContainerW writeCont(datFile, FileWriter::OP_APPEND);
+
FileWriter writer = writeCont.GetWriter(INDEX_FILE_TAG);
BuildIndex(featuresVector, writer, tmpFile);
+ writer.Flush();
+
writeCont.Finish();
}
catch (Reader::OpenException const & e)
@@ -36,6 +39,13 @@ namespace indexer
LOG(LERROR, ("Error writing index file", e.what()));
}
+#ifdef DEBUG
+ FilesContainerR readCont(datFile);
+ FileReader r = readCont.GetReader(HEADER_FILE_TAG);
+ int64_t const base = ReadPrimitiveFromPos<int64_t>(r, 0);
+ LOG(LINFO, ("OFFSET = ", base));
+#endif
+
return true;
}
} // namespace indexer