Fixed notes

This commit is contained in:
Constantin Shalnev 2016-01-14 17:50:31 +03:00
parent b3ced04b21
commit b6e096eb0f
3 changed files with 3 additions and 5 deletions

View file

@ -122,8 +122,7 @@ void ClassifObject::ConcatChildNames(string & s) const
Classificator & classif(MapStyle mapStyle)
{
int const index = static_cast<int>(mapStyle);
ASSERT_GREATER_OR_EQUAL(index, 0, ());
size_t const index = static_cast<size_t>(mapStyle);
ASSERT_LESS(index, MapStyleCount, ());
static Classificator c[MapStyleCount];
return c[index];

View file

@ -48,7 +48,7 @@ namespace classificator
MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle();
for (int i = 0; i < MapStyleCount; ++i)
for (size_t i = 0; i < MapStyleCount; ++i)
{
MapStyle const mapStyle = static_cast<MapStyle>(i);
GetStyleReader().SetCurrentStyle(mapStyle);

View file

@ -187,8 +187,7 @@ void RulesHolder::ResizeCaches(size_t s)
RulesHolder & rules(MapStyle mapStyle)
{
int const index = static_cast<int>(mapStyle);
ASSERT_GREATER_OR_EQUAL(index, 0, ());
size_t const index = static_cast<size_t>(mapStyle);
ASSERT_LESS(index, MapStyleCount, ());
static RulesHolder h[MapStyleCount];
return h[index];