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:
-rw-r--r--coding/file_reader.cpp11
-rw-r--r--common.pri2
-rw-r--r--indexer/geometry_coding.cpp4
-rw-r--r--map/framework.hpp4
-rw-r--r--platform/qtplatform.cpp2
-rw-r--r--qt/update_dialog.cpp6
-rw-r--r--storage/storage.cpp6
-rw-r--r--yg/render_state.cpp4
-rw-r--r--yg/render_state.hpp2
9 files changed, 21 insertions, 20 deletions
diff --git a/coding/file_reader.cpp b/coding/file_reader.cpp
index 15a158231c..e476d59ec6 100644
--- a/coding/file_reader.cpp
+++ b/coding/file_reader.cpp
@@ -17,7 +17,7 @@ namespace
{
public:
explicit FileDataWithCachedSize(string const & fileName)
- : FileData(fileName, FileData::OP_READ), m_Size(static_cast<FileData *>(this)->Size()) {}
+ : FileData(fileName, FileData::OP_READ), m_Size(FileData::Size()) {}
uint64_t Size() const { return m_Size; }
@@ -119,8 +119,9 @@ string FileReader::GetName() const
string FileReader::ReadAsText() const
{
- vector<char> buffer(Size());
- buffer.resize(Size());
- Read(0, &buffer[0], Size());
- return string(reinterpret_cast<char const *>(&buffer[0]), buffer.size());
+ size_t size = static_cast<size_t>(Size());
+ vector<char> buffer(size);
+ buffer.resize(size);
+ Read(0, &buffer[0], size);
+ return string(reinterpret_cast<char const *>(&buffer[0]), size);
}
diff --git a/common.pri b/common.pri
index 342ec8b229..045aedf82e 100644
--- a/common.pri
+++ b/common.pri
@@ -58,7 +58,7 @@ INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/
# Windows-specific options for all projects
win32-msvc2008 {
QMAKE_CLEAN += *.user
- DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
+ DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
QMAKE_CXXFLAGS += -wd4100 -Zi
QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
diff --git a/indexer/geometry_coding.cpp b/indexer/geometry_coding.cpp
index 987315fc1b..7c17f3c29f 100644
--- a/indexer/geometry_coding.cpp
+++ b/indexer/geometry_coding.cpp
@@ -14,8 +14,8 @@ namespace
template <typename T>
inline m2::PointU ClampPoint(m2::PointU const & maxPoint, m2::Point<T> const & point)
{
- return m2::PointU(my::clamp(static_cast<uint32_t>(point.x), 0, maxPoint.x),
- my::clamp(static_cast<uint32_t>(point.y), 0, maxPoint.y));
+ return m2::PointU(my::clamp(static_cast<m2::PointU::value_type>(point.x), static_cast<m2::PointU::value_type>(0), maxPoint.x),
+ my::clamp(static_cast<m2::PointU::value_type>(point.y), static_cast<m2::PointU::value_type>(0), maxPoint.y));
}
}
diff --git a/map/framework.hpp b/map/framework.hpp
index a4197088bf..92ba9de887 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -271,9 +271,9 @@ public:
m_renderQueue.OnSize(w, h);
- m2::PointD ptShift = m_renderQueue.renderState().coordSystemShift(true);
+ m2::PointU ptShift = m_renderQueue.renderState().coordSystemShift(true);
- m_informationDisplay.setDisplayRect(m2::RectI(ptShift, ptShift + m2::PointD(w, h)));
+ m_informationDisplay.setDisplayRect(m2::RectI(ptShift, ptShift + m2::PointU(w, h)));
m_navigator.OnSize(ptShift.x, ptShift.y, w, h);
diff --git a/platform/qtplatform.cpp b/platform/qtplatform.cpp
index fb53ece28b..35293bdd46 100644
--- a/platform/qtplatform.cpp
+++ b/platform/qtplatform.cpp
@@ -374,7 +374,7 @@ public:
sort(res.begin(), res.end());
- for (int i = 0; i < res.size(); ++i)
+ for (size_t i = 0; i < res.size(); ++i)
res[i] = fontFolder + res[i];
return res;
diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp
index ac2db27aa2..18668ce8a9 100644
--- a/qt/update_dialog.cpp
+++ b/qt/update_dialog.cpp
@@ -302,7 +302,7 @@ namespace qt
m_tree->setSortingEnabled(false);
m_tree->clear();
- for (int group = 0; group < m_storage.CountriesCount(TIndex()); ++group)
+ for (int group = 0; group < static_cast<int>(m_storage.CountriesCount(TIndex())); ++group)
{
TIndex const grIndex(group);
QStringList groupText(m_storage.CountryName(grIndex).c_str());
@@ -312,7 +312,7 @@ namespace qt
// set color by status and update country size
UpdateRowWithCountryInfo(grIndex);
- for (int country = 0; country < m_storage.CountriesCount(grIndex); ++country)
+ for (int country = 0; country < static_cast<int>(m_storage.CountriesCount(grIndex)); ++country)
{
TIndex cIndex(group, country);
QStringList countryText(m_storage.CountryName(cIndex).c_str());
@@ -321,7 +321,7 @@ namespace qt
// set color by status and update country size
UpdateRowWithCountryInfo(cIndex);
- for (int region = 0; region < m_storage.CountriesCount(cIndex); ++region)
+ for (int region = 0; region < static_cast<int>(m_storage.CountriesCount(cIndex)); ++region)
{
TIndex const rIndex(group, country, region);
QStringList regionText(m_storage.CountryName(rIndex).c_str());
diff --git a/storage/storage.cpp b/storage/storage.cpp
index 023d9dba81..92a0b616f8 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -66,13 +66,13 @@ namespace storage
TCountriesContainer const & NodeFromIndex(TCountriesContainer const & root, TIndex const & index)
{
// complex logic to avoid [] out_of_bounds exceptions
- if (index.m_group == -1 || index.m_group >= root.SiblingsCount())
+ if (index.m_group == -1 || index.m_group >= static_cast<int>(root.SiblingsCount()))
return root;
else
{
- if (index.m_country == -1 || index.m_country >= root[index.m_group].SiblingsCount())
+ if (index.m_country == -1 || index.m_country >= static_cast<int>(root[index.m_group].SiblingsCount()))
return root[index.m_group];
- if (index.m_region == -1 || index.m_region >= root[index.m_group][index.m_country].SiblingsCount())
+ if (index.m_region == -1 || index.m_region >= static_cast<int>(root[index.m_group][index.m_country].SiblingsCount()))
return root[index.m_group][index.m_country];
return root[index.m_group][index.m_country][index.m_region];
}
diff --git a/yg/render_state.cpp b/yg/render_state.cpp
index 0584b05455..30e5d6f1d3 100644
--- a/yg/render_state.cpp
+++ b/yg/render_state.cpp
@@ -53,11 +53,11 @@ namespace yg
}
}
- m2::PointD const RenderState::coordSystemShift(bool doLock) const
+ m2::PointU const RenderState::coordSystemShift(bool doLock) const
{
if (doLock)
m_mutex->Lock();
- m2::PointD res((m_textureWidth - m_surfaceWidth) / 2,
+ m2::PointU res((m_textureWidth - m_surfaceWidth) / 2,
(m_textureHeight - m_surfaceHeight) / 2);
if (doLock)
m_mutex->Unlock();
diff --git a/yg/render_state.hpp b/yg/render_state.hpp
index 1141e52205..a0933e1421 100644
--- a/yg/render_state.hpp
+++ b/yg/render_state.hpp
@@ -68,7 +68,7 @@ namespace yg
void onSize(size_t w, size_t h);
- m2::PointD const coordSystemShift(bool doLock = false) const;
+ m2::PointU const coordSystemShift(bool doLock = false) const;
};
}
}