diff options
-rw-r--r-- | common.pri | 6 | ||||
-rw-r--r-- | indexer/feature_utils.cpp | 16 | ||||
-rw-r--r-- | indexer/feature_utils.hpp | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/common.pri b/common.pri index 235b27fcd7..84f3e993dc 100644 --- a/common.pri +++ b/common.pri @@ -110,9 +110,6 @@ unix|win32-g++ { QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_CFLAGS_RELEASE *= -ffast-math QMAKE_CXXFLAGS_RELEASE *= -ffast-math - QMAKE_CFLAGS *= -fdata-sections -ffunction-sections - QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections - QMAKE_LFLAGS *= -Wl,--gc-sections } linux-g++* { @@ -121,6 +118,9 @@ linux-g++* { QMAKE_CFLAGS_RELEASE += -flto QMAKE_CXXFLAGS_RELEASE += -flto QMAKE_LFLAGS_RELEASE += -flto + QMAKE_CFLAGS *= -fdata-sections -ffunction-sections + QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections + QMAKE_LFLAGS *= -Wl,--gc-sections } win32-g++ { diff --git a/indexer/feature_utils.cpp b/indexer/feature_utils.cpp index 71a1930231..024525eed9 100644 --- a/indexer/feature_utils.cpp +++ b/indexer/feature_utils.cpp @@ -1,5 +1,7 @@ #include "feature_utils.hpp" #include "classificator.hpp" +#include "feature.hpp" + #include "../geometry/point2d.hpp" #include "../base/base.hpp" #include "../std/vector.hpp" @@ -47,24 +49,24 @@ public: uint8_t GetSearchRank(FeatureType const & feature) const { - uint32_t const population = feature.GetPopulation(); + uint32_t population = feature.GetPopulation(); FeatureBase::GetTypesFn types; feature.ForEachTypeRef(types); for (size_t i = 0; i < types.m_size; ++i) { if (types.m_types[i] == m_TypeVillage) - population = max(population, 1000); + population = max(population, static_cast<uint32_t>(1000)); else if (types.m_types[i] == m_TypeTown) - population = max(population, 10000); + population = max(population, static_cast<uint32_t>(10000)); else if (types.m_types[i] == m_TypeCity) - population = max(population, 100000); + population = max(population, static_cast<uint32_t>(100000)); else if (types.m_types[i] == m_TypeCityCapital) - population = max(population, 1000000); + population = max(population, static_cast<uint32_t>(1000000)); else if (types.m_types[i] == m_TypeCountry) - population = max(population, 2000000); + population = max(population, static_cast<uint32_t>(2000000)); else if (types.m_types[i] == m_TypeContinent) - population = max(population, 20000000); + population = max(population, static_cast<uint32_t>(20000000)); } return static_cast<uint8_t>(log(double(population)) / log(1.1)); diff --git a/indexer/feature_utils.hpp b/indexer/feature_utils.hpp index 97bfea4b49..ac2bfa14d6 100644 --- a/indexer/feature_utils.hpp +++ b/indexer/feature_utils.hpp @@ -1,8 +1,10 @@ #pragma once -#include "feature.hpp" + #include "../geometry/rect2d.hpp" #include "../base/base.hpp" +class FeatureType; + namespace feature { |