|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81994 - sandbox-branches/geometry/index/boost/geometry/extensions/index
From: adam.wulkiewicz_at_[hidden]
Date: 2012-12-15 18:51:25
Author: awulkiew
Date: 2012-12-15 18:51:24 EST (Sat, 15 Dec 2012)
New Revision: 81994
URL: http://svn.boost.org/trac/boost/changeset/81994
Log:
static_vector: types comparison warnings fixed.
Text files modified:
sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp 2012-12-15 18:51:24 EST (Sat, 15 Dec 2012)
@@ -166,7 +166,7 @@
{
// TODO change name of this macro
BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(difference_type dist = std::distance(this->begin(), position));
- BOOST_ASSERT_MSG(0 <= dist && dist < m_size, "invalid iterator");
+ BOOST_ASSERT_MSG(0 <= dist && (sizeof(dist)<=sizeof(m_size)?((size_type)dist<m_size):(dist<(difference_type)m_size)), "invalid iterator");
this->move(position + 1, this->end(), position); // may throw
this->destroy(this->end() - 1);
@@ -178,8 +178,8 @@
// TODO change name of this macro
BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(difference_type distf = std::distance(this->begin(), first));
BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(difference_type distl = std::distance(this->begin(), last));
- BOOST_ASSERT_MSG(0 <= distf && distf < m_size, "invalid iterator");
- BOOST_ASSERT_MSG(0 <= distl && distl < m_size, "invalid iterator");
+ BOOST_ASSERT_MSG(0 <= distf && (sizeof(distf)<=sizeof(m_size)?((size_type)distf<m_size):(distf<(difference_type)m_size)), "invalid iterator");
+ BOOST_ASSERT_MSG(0 <= distl && (sizeof(distl)<=sizeof(m_size)?((size_type)distl<m_size):(distl<(difference_type)m_size)), "invalid iterator");
difference_type n = std::distance(first, last);
BOOST_ASSERT_MSG(0 <= n, "invalid iterator");
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk