Renamed variables

This commit is contained in:
Alex Zolotarev 2011-08-17 14:15:53 +03:00 committed by Alex Zolotarev
parent a9c853e394
commit 7732d884c7
3 changed files with 10 additions and 8 deletions

View file

@ -254,7 +254,7 @@ uint32_t FeatureTypesProcessor::GetType(char const * arr[], size_t n)
void FeatureTypesProcessor::CorrectType(uint32_t & t) const
{
if (m_dontNormilize.count(t) > 0) return;
if (m_dontNormalize.count(t) > 0) return;
// 1. get normalized type:
// highway-motorway-bridge => highway-motorway
@ -277,9 +277,9 @@ void FeatureTypesProcessor::SetMappingTypes(char const * arr1[2], char const * a
m_mapping[GetType(arr1, 2)] = GetType(arr2, 2);
}
void FeatureTypesProcessor::SetDontNormilizeType(char const * arr[3])
void FeatureTypesProcessor::SetDontNormalizeType(char const * arr[3])
{
m_dontNormilize.insert(GetType(arr, 3));
m_dontNormalize.insert(GetType(arr, 3));
}
MergedFeatureBuilder1 * FeatureTypesProcessor::operator() (FeatureBuilder1 const & fb)

View file

@ -88,7 +88,7 @@ public:
/// Feature types corrector.
class FeatureTypesProcessor
{
set<uint32_t> m_dontNormilize;
set<uint32_t> m_dontNormalize;
map<uint32_t, uint32_t> m_mapping;
static uint32_t GetType(char const * arr[], size_t n);
@ -108,7 +108,7 @@ public:
void SetMappingTypes(char const * arr1[2], char const * arr2[2]);
/// Leave original types, for example: boundary-administrative-2.
void SetDontNormilizeType(char const * arr[3]);
void SetDontNormalizeType(char const * arr[3]);
MergedFeatureBuilder1 * operator() (FeatureBuilder1 const & fb);
};

View file

@ -82,12 +82,14 @@ public:
// m_typesCorrector.SetMappingTypes(arr1, arr2);
//}
char const * arrDontNormilize[][3] = {
// Do not strip last types for given tags,
// for example, do not cut "-2" in "boundary-administrative-2"
char const * arrDontNormalize[][3] = {
{ "boundary", "administrative", "2" }
};
for (size_t i = 0; i < ARRAY_SIZE(arrDontNormilize); ++i)
m_typesCorrector.SetDontNormilizeType(arrDontNormilize[i]);
for (size_t i = 0; i < ARRAY_SIZE(arrDontNormalize); ++i)
m_typesCorrector.SetDontNormalizeType(arrDontNormalize[i]);
}
~WorldMapGenerator()