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:
authorMWM Planet Generator cdn3 <osm@cdn3.mapswithme.com>2015-10-22 00:23:51 +0300
committerMWM Planet Generator cdn3 <osm@cdn3.mapswithme.com>2015-10-22 00:23:51 +0300
commit23d9c80ff3fcf46799925c592c17a1e1a5b2486f (patch)
treea438c5a05008dd767e0179146ba72e92495913d8
parentaa9a51afd2dcc6d5b3166d2876a2dc7845618600 (diff)
[linux] Fixed project build with g++ 4.8.
-rw-r--r--api/src/c/api-client.c6
-rw-r--r--common.pri7
-rw-r--r--indexer/search_index_builder.cpp10
-rw-r--r--routing/turns.cpp4
-rw-r--r--routing/turns.hpp5
5 files changed, 16 insertions, 16 deletions
diff --git a/api/src/c/api-client.c b/api/src/c/api-client.c
index 322becc5e1..ef748a9ece 100644
--- a/api/src/c/api-client.c
+++ b/api/src/c/api-client.c
@@ -92,9 +92,11 @@ void MapsWithMe_TransformName(char * s)
// See rfc3986, rfc1738, rfc2396.
size_t MapsWithMe_UrlEncodeString(char const * s, size_t size, char ** res)
{
+ size_t i;
+ char * out;
*res = malloc(size * 3 + 1);
- char * out = *res;
- for (size_t i = 0; i < size; ++i)
+ out = *res;
+ for (i = 0; i < size; ++i)
{
unsigned char c = (unsigned char)(s[i]);
switch (c)
diff --git a/common.pri b/common.pri
index 9caeaa01ae..3f679d815e 100644
--- a/common.pri
+++ b/common.pri
@@ -131,12 +131,9 @@ win32-msvc201* {
unix|win32-g++ {
LIBS *= -lz
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-parameter \
- -Werror=return-type -Wno-deprecated-register
- iphone*-clang|macx-clang {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
- }
+ -Wno-unused-local-typedef
*-clang {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-conversion
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-conversion -Werror=return-type -Wno-deprecated-register
}
tizen{
diff --git a/indexer/search_index_builder.cpp b/indexer/search_index_builder.cpp
index 81f4d01803..0048ad9108 100644
--- a/indexer/search_index_builder.cpp
+++ b/indexer/search_index_builder.cpp
@@ -226,21 +226,21 @@ class FeatureInserter
Classificator const & c = classif();
// Fill types that always! should be skipped.
- for (auto const & e : (StringIL[]) { { "entrance" } })
+ for (StringIL const & e : (StringIL[]) { { "entrance" } })
m_skipF[0].push_back(c.GetTypeByPath(e));
- for (auto const & e : (StringIL[]) { { "building", "address" } })
+ for (StringIL const & e : (StringIL[]) { { "building", "address" } })
m_skipF[1].push_back(c.GetTypeByPath(e));
// Fill types that never! will be skipped.
- for (auto const & e : (StringIL[]) { { "highway", "bus_stop" }, { "highway", "speed_camera" } })
+ for (StringIL const & e : (StringIL[]) { { "highway", "bus_stop" }, { "highway", "speed_camera" } })
m_dontSkipEn.push_back(c.GetTypeByPath(e));
// Fill types that will be skipped if feature's name is empty!
- for (auto const & e : (StringIL[]) { { "building" }, { "highway" }, { "natural" }, { "waterway" }, { "landuse" } })
+ for (StringIL const & e : (StringIL[]) { { "building" }, { "highway" }, { "natural" }, { "waterway" }, { "landuse" } })
m_skipEn[0].push_back(c.GetTypeByPath(e));
- for (auto const & e : (StringIL[]) {
+ for (StringIL const & e : (StringIL[]) {
{ "place", "country" },
{ "place", "state" },
{ "place", "county" },
diff --git a/routing/turns.cpp b/routing/turns.cpp
index 98da2a61a0..4e2f47e6cf 100644
--- a/routing/turns.cpp
+++ b/routing/turns.cpp
@@ -11,7 +11,7 @@ using namespace routing::turns;
/// The order is important. Starting with the most frequent tokens according to
/// taginfo.openstreetmap.org we minimize the number of the comparisons in ParseSingleLane().
-array<pair<LaneWay, string>, static_cast<size_t>(LaneWay::Count)> const g_laneWayNames = {
+array<pair<LaneWay, char const *>, static_cast<size_t>(LaneWay::Count)> const g_laneWayNames = {
{{LaneWay::Through, "through"},
{LaneWay::Left, "left"},
{LaneWay::Right, "right"},
@@ -26,7 +26,7 @@ array<pair<LaneWay, string>, static_cast<size_t>(LaneWay::Count)> const g_laneWa
static_assert(g_laneWayNames.size() == static_cast<size_t>(LaneWay::Count),
"Check the size of g_laneWayNames");
-array<pair<TurnDirection, string>, static_cast<size_t>(TurnDirection::Count)> const g_turnNames = {
+array<pair<TurnDirection, char const *>, static_cast<size_t>(TurnDirection::Count)> const g_turnNames = {
{{TurnDirection::NoTurn, "NoTurn"},
{TurnDirection::GoStraight, "GoStraight"},
{TurnDirection::TurnRight, "TurnRight"},
diff --git a/routing/turns.hpp b/routing/turns.hpp
index a91a2123b6..a810271343 100644
--- a/routing/turns.hpp
+++ b/routing/turns.hpp
@@ -98,9 +98,10 @@ typedef vector<LaneWay> TSingleLane;
struct SingleLaneInfo
{
TSingleLane m_lane;
- bool m_isRecommended;
+ bool m_isRecommended = false;
- SingleLaneInfo(initializer_list<LaneWay> const & l = {}) : m_lane(l), m_isRecommended(false) {}
+ SingleLaneInfo() = default;
+ SingleLaneInfo(initializer_list<LaneWay> const & l) : m_lane(l) {}
bool operator==(SingleLaneInfo const & other) const;
};