/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
android-95
indexer/map_style.cpp
47 строк
1 KB
r.kuznetsov
Added support of vehicle styles
16 фев 2017, 19:39
16 фев 2017, 19:39
f6607f4
Код
Авторство
О чём код?
#include "indexer/map_style.hpp" #include "base/assert.hpp" MapStyle const kDefaultMapStyle = MapStyleClear; MapStyle MapStyleFromSettings(std::string const & str) { // MapStyleMerged is service style. It's unavailable for users. if (str == "MapStyleClear") return MapStyleClear; else if (str == "MapStyleDark") return MapStyleDark; else if (str == "MapStyleVehicleClear") return MapStyleVehicleClear; else if (str == "MapStyleVehicleDark") return MapStyleVehicleDark; return kDefaultMapStyle; } std::string MapStyleToString(MapStyle mapStyle) { switch (mapStyle) { case MapStyleDark: return "MapStyleDark"; case MapStyleClear: return "MapStyleClear"; case MapStyleMerged: return "MapStyleMerged"; case MapStyleVehicleDark: return "MapStyleVehicleDark"; case MapStyleVehicleClear: return "MapStyleVehicleClear"; case MapStyleCount: break; } ASSERT(false, ()); return std::string(); } std::string DebugPrint(MapStyle mapStyle) { return MapStyleToString(mapStyle); }