diff --git a/generator/osm_element.hpp b/generator/osm_element.hpp index 06b8b1c25c..a26a12c634 100644 --- a/generator/osm_element.hpp +++ b/generator/osm_element.hpp @@ -440,7 +440,7 @@ protected: { uint64_t id; FeatureParams fValue; - if (!ParseType(p, id, fValue)) + if (!base_type::ParseType(p, id, fValue)) return; feature_t ft; diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 8686666940..6f6ea53a8d 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -2,6 +2,7 @@ #include "../coding/multilang_utf8_string.hpp" #include "../coding/value_opt_string.hpp" +#include "../coding/reader.hpp" #include "../std/string.hpp" #include "../std/vector.hpp" @@ -54,23 +55,23 @@ struct FeatureParamsBase template void Write(TSink & sink, uint8_t header, feature::EGeomType type) const { - if (header & HEADER_HAS_NAME) + if (header & feature::HEADER_HAS_NAME) name.Write(sink); - if (header & HEADER_HAS_LAYER) + if (header & feature::HEADER_HAS_LAYER) WriteToSink(sink, layer); - if (header & HEADER_HAS_ADDINFO) + if (header & feature::HEADER_HAS_ADDINFO) { switch (type) { - case GEOM_POINT: + case feature::GEOM_POINT: WriteToSink(sink, rank); break; - case GEOM_LINE: + case feature::GEOM_LINE: utils::WriteString(sink, ref); break; - case GEOM_AREA: + case feature::GEOM_AREA: house.Write(sink); break; } @@ -80,23 +81,23 @@ struct FeatureParamsBase template void Read(TSrc & src, uint8_t header, feature::EGeomType type) { - if (header & HEADER_HAS_NAME) + if (header & feature::HEADER_HAS_NAME) name.Read(src); - if (header & HEADER_HAS_LAYER) + if (header & feature::HEADER_HAS_LAYER) layer = ReadPrimitiveFromSource(src); - if (header & HEADER_HAS_ADDINFO) + if (header & feature::HEADER_HAS_ADDINFO) { switch (type) { - case GEOM_POINT: + case feature::GEOM_POINT: rank = ReadPrimitiveFromSource(src); break; - case GEOM_LINE: + case feature::GEOM_LINE: utils::ReadString(src, ref); break; - case GEOM_AREA: + case feature::GEOM_AREA: house.Read(src); break; } diff --git a/map/framework.cpp b/map/framework.cpp index 9adf3f1290..1795b4dc40 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -106,15 +106,15 @@ namespace fwork m_keys.erase(unique(m_keys.begin(), m_keys.end(), equal_key()), m_keys.end()); } -#define GET_POINTS(functor_t, for_each_fun, assign_fun) \ - { \ - functor_t fun(m_convertor, m_rect); \ - f.for_each_fun(fun, m_zoom); \ - if (fun.IsExist()) \ - { \ - isExist = true; \ - assign_fun(ptr.get(), fun); \ - } \ +#define GET_POINTS(f, for_each_fun, functor_t, assign_fun) \ + { \ + functor_t fun(m_convertor, m_rect); \ + f.for_each_fun(fun, m_zoom); \ + if (fun.IsExist()) \ + { \ + isExist = true; \ + assign_fun(ptr.get(), fun); \ + } \ } bool DrawProcessor::operator()(FeatureType const & f) @@ -145,11 +145,11 @@ namespace fwork switch (type) { case GEOM_POINT: - GET_POINTS(get_pts::one_point, ForEachPointRef, assign_point) + GET_POINTS(f, ForEachPointRef, get_pts::one_point, assign_point) break; case GEOM_AREA: - GET_POINTS(filter_screenpts_adapter, ForEachTriangleExRef, assign_area) + GET_POINTS(f, ForEachTriangleExRef, filter_screenpts_adapter, assign_area) { // if area feature has any line-drawing-rules, than draw it like line for (size_t i = 0; i < m_keys.size(); ++i) @@ -160,7 +160,7 @@ namespace fwork draw_line: case GEOM_LINE: - GET_POINTS(filter_screenpts_adapter, ForEachPointRef, assign_path) + GET_POINTS(f, ForEachPointRef, filter_screenpts_adapter, assign_path) break; }