Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2015-10-13 18:57:51 +0300
committerConstantin Shalnev <c.shalnev@corp.mail.ru>2015-10-14 10:38:51 +0300
commit288e896af0f0484ed3a03b5ae87fc867eb1ee1c5 (patch)
tree07610f0417526e333b587dee2170e1bf92bf3cc2 /indexer/drawing_rules.cpp
parent4f9195930e8fd6d6315155cc95df199f82d74701 (diff)
CityRank and PopRank was removed as obsolete
Diffstat (limited to 'indexer/drawing_rules.cpp')
-rw-r--r--indexer/drawing_rules.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp
index 149634006d..08dd783c5b 100644
--- a/indexer/drawing_rules.cpp
+++ b/indexer/drawing_rules.cpp
@@ -118,7 +118,6 @@ void BaseRule::SetSelector(unique_ptr<ISelector> && selector)
RulesHolder::RulesHolder()
: m_bgColors(scales::UPPER_STYLE_SCALE+1, DEFAULT_BG_COLOR)
- , m_cityRankTable(GetConstRankCityRankTable())
{}
RulesHolder::~RulesHolder()
@@ -176,14 +175,6 @@ uint32_t RulesHolder::GetBgColor(int scale) const
return m_bgColors[scale];
}
-double RulesHolder::GetCityRank(int scale, uint32_t population) const
-{
- double rank;
- if (!m_cityRankTable->GetCityRank(scale, population, rank))
- return -1.0; // do not draw
- return rank;
-}
-
void RulesHolder::ClearCaches()
{
ForEachRule(bind(static_cast<void (BaseRule::*)()>(&BaseRule::MakeEmptyID), _4));
@@ -526,45 +517,11 @@ void RulesHolder::LoadFromBinaryProto(string const & s)
InitBackgroundColors(doSet.m_cont);
}
-void RulesHolder::LoadCityRankTableFromString(string & s)
-{
- unique_ptr<ICityRankTable> table;
-
- if (!s.empty())
- {
- table = GetCityRankTableFromString(s);
-
- if (nullptr == table)
- LOG(LINFO, ("Invalid city-rank-table file"));
- }
-
- if (nullptr == table)
- table = GetConstRankCityRankTable();
-
- m_cityRankTable = move(table);
-}
-
void LoadRules()
{
string buffer;
-
- // Load drules_proto
GetStyleReader().GetDrawingRulesReader().ReadAsString(buffer);
rules().LoadFromBinaryProto(buffer);
-
- // Load city_rank
- buffer.clear();
- try
- {
- ReaderPtr<Reader> cityRankFileReader = GetPlatform().GetReader("city_rank.txt");
- cityRankFileReader.ReadAsString(buffer);
- }
- catch (FileAbsentException & e)
- {
- // city-rank.txt file is optional, if it does not exist, then default city-rank-table is used
- LOG(LINFO, ("File city-rank-table does not exist", e.Msg()));
- }
- rules().LoadCityRankTableFromString(buffer);
}
}