|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66505 - in trunk: boost/wave/util libs/wave libs/wave/test/testwave
From: hartmut.kaiser_at_[hidden]
Date: 2010-11-11 19:50:51
Author: hkaiser
Date: 2010-11-11 19:50:46 EST (Thu, 11 Nov 2010)
New Revision: 66505
URL: http://svn.boost.org/trac/boost/changeset/66505
Log:
Wave: adjusting code to pass new assert inspect rule
Text files modified:
trunk/boost/wave/util/flex_string.hpp | 22 +++++++++++-----------
trunk/libs/wave/ChangeLog | 2 ++
trunk/libs/wave/test/testwave/testwave_app.cpp | 3 ++-
3 files changed, 15 insertions(+), 12 deletions(-)
Modified: trunk/boost/wave/util/flex_string.hpp
==============================================================================
--- trunk/boost/wave/util/flex_string.hpp (original)
+++ trunk/boost/wave/util/flex_string.hpp 2010-11-11 19:50:46 EST (Thu, 11 Nov 2010)
@@ -80,7 +80,7 @@
*/
#include <boost/config.hpp>
-#include <boost/assert.hpp>
+#include <boost/BOOST_ASSERT.hpp>
#include <boost/throw_exception.hpp>
#include <boost/iterator/reverse_iterator.hpp>
@@ -1818,7 +1818,7 @@
#ifndef NDEBUG
Invariant checker(*this);
#endif
- assert(begin() <= p && p <= end());
+ BOOST_ASSERT(begin() <= p && p <= end());
const size_type insertOffset(p - begin());
const size_type originalSize(size());
if(n < originalSize - insertOffset)
@@ -1884,16 +1884,16 @@
const typename std::iterator_traits<FwdIterator>::difference_type n2 =
std::distance(s1, s2);
- assert(n2 >= 0);
+ BOOST_ASSERT(n2 >= 0);
using namespace flex_string_details;
- assert(pos <= size());
+ BOOST_ASSERT(pos <= size());
const typename std::iterator_traits<FwdIterator>::difference_type maxn2 =
capacity() - size();
if (maxn2 < n2)
{
// Reallocate the string.
- assert(!IsAliasedRange(s1, s2));
+ BOOST_ASSERT(!IsAliasedRange(s1, s2));
reserve(size() + n2);
i = begin() + pos;
}
@@ -1910,7 +1910,7 @@
FwdIterator t = s1;
const size_type old_size = size();
std::advance(t, old_size - pos);
- assert(std::distance(t, s2) >= 0);
+ BOOST_ASSERT(std::distance(t, s2) >= 0);
Storage::append(t, s2);
Storage::append(data() + pos, data() + old_size);
std::copy(s1, t, i);
@@ -2011,9 +2011,9 @@
flex_string& ReplaceImplDiscr(iterator i1, iterator i2,
const value_type* s, size_type n, Selector<2>)
{
- assert(i1 <= i2);
- assert(begin() <= i1 && i1 <= end());
- assert(begin() <= i2 && i2 <= end());
+ BOOST_ASSERT(i1 <= i2);
+ BOOST_ASSERT(begin() <= i1 && i1 <= end());
+ BOOST_ASSERT(begin() <= i2 && i2 <= end());
return replace(i1, i2, s, s + n);
}
@@ -2052,10 +2052,10 @@
#endif
const typename std::iterator_traits<iterator>::difference_type n1 =
i2 - i1;
- assert(n1 >= 0);
+ BOOST_ASSERT(n1 >= 0);
const typename std::iterator_traits<FwdIterator>::difference_type n2 =
std::distance(s1, s2);
- assert(n2 >= 0);
+ BOOST_ASSERT(n2 >= 0);
if (IsAliasedRange(s1, s2))
{
Modified: trunk/libs/wave/ChangeLog
==============================================================================
--- trunk/libs/wave/ChangeLog (original)
+++ trunk/libs/wave/ChangeLog 2010-11-11 19:50:46 EST (Thu, 11 Nov 2010)
@@ -37,6 +37,8 @@
preprocessing instead of just inhibiting the expansion of the macro.
- Fixed a duplicated call to the pp hook skipped_token for preprocessing
directives inside inactive conditional branches.
+- Changing exception handling to fix clang++ regression errors.
+- Replaced assert() with BOOST_ASSERT to pacify the Boost inspect tool.
Boost V1.44.0
- V2.0.6
Modified: trunk/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- trunk/libs/wave/test/testwave/testwave_app.cpp (original)
+++ trunk/libs/wave/test/testwave/testwave_app.cpp 2010-11-11 19:50:46 EST (Thu, 11 Nov 2010)
@@ -18,6 +18,7 @@
// include boost
#include <boost/config.hpp>
+#include <boost/assert.hpp>
#include <boost/throw_exception.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
@@ -619,7 +620,7 @@
value.clear();
else {
std::string::size_type last = value.find_last_not_of(" \t");
- assert(std::string::npos != last);
+ BOOST_ASSERT(std::string::npos != last);
value = value.substr(first, last-first+1);
}
return value;
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