From 177c80da94174b49cd88194b4c3be4ae7c10e478 Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 8 Jul 2015 19:02:53 +0300 Subject: [PATCH] Minor code fixes. --- indexer/features_offsets_table.cpp | 2 +- indexer/features_offsets_table.hpp | 2 +- routing/osrm2feature_map.hpp | 2 +- storage/storage.cpp | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/indexer/features_offsets_table.cpp b/indexer/features_offsets_table.cpp index f75811e397..e18824136d 100644 --- a/indexer/features_offsets_table.cpp +++ b/indexer/features_offsets_table.cpp @@ -13,7 +13,7 @@ namespace feature { -void FeaturesOffsetsTable::Builder::PushOffset(uint32_t const offset) + void FeaturesOffsetsTable::Builder::PushOffset(uint32_t const offset) { ASSERT(m_offsets.empty() || m_offsets.back() < offset, ()); m_offsets.push_back(offset); diff --git a/indexer/features_offsets_table.hpp b/indexer/features_offsets_table.hpp index 803030b72f..25017a463f 100644 --- a/indexer/features_offsets_table.hpp +++ b/indexer/features_offsets_table.hpp @@ -92,7 +92,7 @@ namespace feature /// \return byte size of a table, may be slightly different from a /// real byte size in memory or on disk due to alignment, but /// can be used in benchmarks, logging, etc. - inline size_t byte_size() { return succinct::mapper::size_of(m_table); } + //inline size_t byte_size() { return static_cast(succinct::mapper::size_of(m_table)); } private: FeaturesOffsetsTable(succinct::elias_fano::elias_fano_builder & builder); diff --git a/routing/osrm2feature_map.hpp b/routing/osrm2feature_map.hpp index 097511924a..c3e23f8560 100644 --- a/routing/osrm2feature_map.hpp +++ b/routing/osrm2feature_map.hpp @@ -166,7 +166,7 @@ public: /// @return Node id for segment's index. TOsrmNodeId GetNodeId(size_t segInd) const; - size_t GetSegmentsCount() const { return m_segments.size(); } + size_t GetSegmentsCount() const { return static_cast(m_segments.size()); } //@} protected: diff --git a/storage/storage.cpp b/storage/storage.cpp index 3072f6aafc..2ce3ff0dd3 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -557,10 +557,8 @@ bool Storage::RegisterDownloadedFile(string const & path, uint64_t size, int64_t { QueuedCountry & queuedCountry = m_queue.front(); TIndex const & index = queuedCountry.GetIndex(); - uint64_t const expectedSize = GetDownloadSize(queuedCountry); - ASSERT_EQUAL(size, expectedSize, ("Downloaded file size mismatch:", size, - "bytes were downloaded,", expectedSize, "bytes expected.")); + ASSERT_EQUAL(size, GetDownloadSize(queuedCountry), ("Downloaded file size mismatch with expected")); CountryFile const countryFile = GetCountryFile(index); shared_ptr localFile = GetLocalFile(index, version);