Fix source code warnings

This commit is contained in:
Sergey Yershov 2015-09-23 14:19:59 +03:00 committed by Sergey Yershov
parent 9062b8a1e8
commit ca1b42450f
7 changed files with 7 additions and 7 deletions

View file

@ -6,7 +6,7 @@
namespace il
{
void EncodePngToMemory(size_t width, size_t height,
void EncodePngToMemory(uint32_t width, uint32_t height,
vector<uint8_t> const & rgba,
vector<uint8_t> & out)
{

View file

@ -6,7 +6,7 @@
namespace il
{
void EncodePngToMemory(size_t width, size_t height,
void EncodePngToMemory(uint32_t width, uint32_t height,
vector<uint8_t> const & rgba,
vector<uint8_t> & out);

View file

@ -428,7 +428,7 @@ namespace feature
bool const isLine = fb.IsLine();
bool const isArea = fb.IsArea();
int const scalesStart = m_header.GetScalesCount() - 1;
int const scalesStart = static_cast<int>(m_header.GetScalesCount()) - 1;
for (int i = scalesStart; i >= 0; --i)
{
int const level = m_header.GetScale(i);

View file

@ -152,7 +152,7 @@ namespace feature
{
m_Names.push_back(country->m_name);
m_Buckets.push_back(new FeatureOutT(m_info.GetTmpFileName(country->m_name)));
country->m_index = m_Buckets.size()-1;
country->m_index = static_cast<int>(m_Buckets.size())-1;
}
(*(m_Buckets[country->m_index]))(fb);

View file

@ -114,7 +114,7 @@ namespace tesselator
void MakeTrianglesChain(PointsInfo const & points, iter_t start, vector<Edge> & chain, bool goodOrder) const;
size_t GetCount() const { return m_triangles.size(); }
Triangle GetTriangle(int i) const { return m_triangles[i]; }
Triangle GetTriangle(size_t i) const { return m_triangles[i]; }
};
list<ListInfo> m_triangles;

View file

@ -125,7 +125,7 @@ namespace feature
uint32_t FeaturesOffsetsTable::GetFeatureOffset(size_t index) const
{
ASSERT_LESS(index, size(), ("Index out of bounds", index, size()));
return m_table.select(index);
return static_cast<uint32_t>(m_table.select(index));
}
size_t FeaturesOffsetsTable::GetFeatureIndexbyOffset(uint32_t offset) const

View file

@ -103,7 +103,7 @@ namespace feature
FileWriter::DeleteFileX(indexFile);
FeaturesOffsetsTable::Builder builder;
FeaturesVector::ForEachOffset(baseContainer.GetReader(DATA_FILE_TAG), [&builder](uint64_t offset)
FeaturesVector::ForEachOffset(baseContainer.GetReader(DATA_FILE_TAG), [&builder](uint32_t offset)
{
builder.PushOffset(offset);
});