[editor] Building levels support in the core.#2670
Conversation
|
DUDE JTTP |
data/editor.config
Outdated
There was a problem hiding this comment.
То есть, решили не мёржить всё подряд?
2191496 to
0245a28
Compare
|
@Zverik PTAL DUDE JTTP |
base/string_utils.cpp
Outdated
There was a problem hiding this comment.
Зачем ssize_t, зачем static_cast ??
Лучше size_t i = 2; i < size(); { внутри писать i-2, i-1, i }
There was a problem hiding this comment.
for (size_t i = 0; i + 2 < utf8.size(); ++i)
Заодно s/utf8String/utf8/
0245a28 to
af10e69
Compare
editor/editor_config.cpp
Outdated
There was a problem hiding this comment.
Вот эта строчка зачем? Она не сломает какой-то важный список в приложении?
There was a problem hiding this comment.
Эта строчка убирает заматчившийся building из вектора всех типов фичи, чтобы по нему зря не бегать дальше в циклах.
On Apr 1, 2016, at 16:02, Ilya Zverev notifications@github.com wrote:
In editor/editor_config.cpp #2670 (comment):
TypeAggregatedDescription & outDesc) const{
- bool isBuilding = false;
- for (auto it = classificatorTypes.begin(); it != classificatorTypes.end(); ++it)
- {
- if (*it == "building")
- {
outDesc.m_address = isBuilding = true;outDesc.m_editableFields.push_back(feature::Metadata::FMD_BUILDING_LEVELS);outDesc.m_editableFields.push_back(feature::Metadata::FMD_POSTCODE); Вот эта строчка зачем? Она не сломает какой-то важный список в приложении?classificatorTypes.erase(it);—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/mapsme/omim/pull/2670/files/af10e69d522742081c4007f6da63a022705f438b#r58201922
There was a problem hiding this comment.
Это не повлияет на отображение зданий?
There was a problem hiding this comment.
Нет, это временный вектор, который создается перед вызовом этой функции только с одной целью - передать в нее список типов фичи.
On Apr 1, 2016, at 16:51, Ilya Zverev notifications@github.com wrote:
In editor/editor_config.cpp #2670 (comment):
TypeAggregatedDescription & outDesc) const{
- bool isBuilding = false;
- for (auto it = classificatorTypes.begin(); it != classificatorTypes.end(); ++it)
- {
- if (*it == "building")
- {
outDesc.m_address = isBuilding = true;outDesc.m_editableFields.push_back(feature::Metadata::FMD_BUILDING_LEVELS);outDesc.m_editableFields.push_back(feature::Metadata::FMD_POSTCODE); Это не повлияет на отображение зданий?classificatorTypes.erase(it);—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/mapsme/omim/pull/2670/files/af10e69d522742081c4007f6da63a022705f438b#r58207848
|
LGTM |
1 similar comment
|
LGTM |
af10e69 to
48f13c5
Compare
|
@ygorshenin @vng PTAL & merge please. |
|
@ygorshenin @vng PTAL & merge please. |
generator/osm2meta.cpp
Outdated
There was a problem hiding this comment.
Т.е. наша прога сломается с очередным арабским небоскребом? Зачем как-то ограничивать это чиселко?
There was a problem hiding this comment.
Чтобы фильтровать мусор из осма, где может быть всё, что угодно.
On 4.4.2016, at 18.29, ygorshenin notifications@github.com wrote:
In generator/osm2meta.cpp:
{
- double d;
- if (!strings::to_double(v, d) || d == 0)
- return {};
- return strings::to_string_dac(d, 1);
- // https://en.wikipedia.org/wiki/List_of_tallest_buildings_in_the_world
- auto constexpr kMaxBuildingLevelsInTheWorld = 167;
Т.е. наша прога сломается с очередным арабским небоскребом? Зачем как-то ограничивать это чиселко?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
There was a problem hiding this comment.
Чтобы фильтровать мусор из осма достаточно проверить что передано число, а не что передано число до 167.
There was a problem hiding this comment.
Превышающие значения будут не около 168, а за 500: это скажется и на нашем рендеринге (наверное, я не проверял), и ещё, может, на чём-нибудь. Не вижу ничего плохого в том, чтобы проверять.
f95ce43 to
baf4a0c
Compare
|
@ygorshenin @vng PTAL |
|
Падают не мои тесты, они уже пофикшены в мастере, но мой реквест еще фикс не включает. |
|
LGTM |
1 similar comment
|
LGTM |
No description provided.