Use BOOST_FALLTHROUGH instead of the broken typo version

This commit is contained in:
Ion Gaztañaga
2017-08-27 01:59:32 +02:00
parent 21fbd71ef3
commit 6530b7870f
2 changed files with 3 additions and 17 deletions

View File

@@ -69,16 +69,12 @@ struct are_elements_contiguous< ::boost::move_iterator<It> >
// predeclarations
/////////////////////////
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template<class Pointer>
class vector_iterator;
template<class Pointer>
class vector_const_iterator;
#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
} //namespace container_detail {
} //namespace container {
@@ -97,8 +93,6 @@ namespace container_detail {
//vector_[const_]iterator
/////////////////////////
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template<class Pointer>
struct are_elements_contiguous<boost::container::container_detail::vector_iterator<Pointer> >
{
@@ -111,8 +105,6 @@ struct are_elements_contiguous<boost::container::container_detail::vector_const_
static const bool value = true;
};
#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
/////////////////////////
// offset_ptr
/////////////////////////
@@ -1073,21 +1065,21 @@ inline typename container_detail::enable_if_c
std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage;
short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH
BOOST_FALLTHROUGH;
case 3:
std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage);
std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage;
short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH
BOOST_FALLTHROUGH;
case 2:
std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage);
std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage;
short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH
BOOST_FALLTHROUGH;
case 1:
std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage);

View File

@@ -43,12 +43,6 @@
# endif
#endif
#if !defined(BOOST_FALLTHOUGH)
#define BOOST_CONTAINER_FALLTHOUGH
#else
#define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH;
#endif
#if defined(BOOST_MSVC) && (_MSC_VER < 1400)
#define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
#endif