From 64cb846aad9f730c67a13576bb04df62bbb31c23 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Tue, 26 Apr 2011 02:41:04 +0200 Subject: [PATCH] Warning fixes --- console_sloynik/main.cpp | 2 +- generator/feature_sorter.cpp | 4 ++-- indexer/data_header.cpp | 2 +- indexer/feature.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/console_sloynik/main.cpp b/console_sloynik/main.cpp index 56b32f68bd..88130e0db8 100644 --- a/console_sloynik/main.cpp +++ b/console_sloynik/main.cpp @@ -22,7 +22,7 @@ int main(int argc, char * argv []) if (!FLAGS_lookup.empty()) { CHECK(m_pDic.get(), ("Dictionary should not be empty.")); - for (int i = 0; i < m_pDic->KeyCount(); ++i) + for (sl::Dictionary::Id i = 0; i < m_pDic->KeyCount(); ++i) { string key; m_pDic->KeyById(i, key); diff --git a/generator/feature_sorter.cpp b/generator/feature_sorter.cpp index e80c5a88f1..d698a6dd72 100644 --- a/generator/feature_sorter.cpp +++ b/generator/feature_sorter.cpp @@ -91,7 +91,7 @@ namespace feature FeaturesCollector2(string const & fName, feature::DataHeader const & header) : FeaturesCollector(fName + DATA_FILE_TAG), m_writer(fName), m_header(header) { - for (int i = 0; i < m_header.GetScalesCount(); ++i) + for (size_t i = 0; i < m_header.GetScalesCount(); ++i) { string const postfix = utils::to_string(i); m_geoFile.push_back(new FileWriter(fName + GEOMETRY_FILE_TAG + postfix)); @@ -112,7 +112,7 @@ namespace feature m_writer.Append(m_datFile.GetName(), DATA_FILE_TAG); - for (int i = 0; i < m_header.GetScalesCount(); ++i) + for (size_t i = 0; i < m_header.GetScalesCount(); ++i) { string const geomFile = m_geoFile[i]->GetName(); string const trgFile = m_trgFile[i]->GetName(); diff --git a/indexer/data_header.cpp b/indexer/data_header.cpp index 000ae23f08..30eb1e73a0 100644 --- a/indexer/data_header.cpp +++ b/indexer/data_header.cpp @@ -33,7 +33,7 @@ namespace feature void DataHeader::SetScales(int * arr) { - for (int i = 0; i < m_scales.size(); ++i) + for (size_t i = 0; i < m_scales.size(); ++i) m_scales[i] = static_cast(arr[i]); } diff --git a/indexer/feature.cpp b/indexer/feature.cpp index 2b9ff42098..8accf58a70 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -912,7 +912,7 @@ void FeatureType::ReadOffsets(ArrayByteSource & src, uint8_t mask, offsets_t & o { ASSERT_GREATER ( mask, 0, () ); - int index = 0; + size_t index = 0; while (mask > 0) { ASSERT_LESS ( index, m_header->GetScalesCount(), () );