diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-05 20:54:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-05 22:21:49 +0000 |
commit | 4d6a509efe6bd56613b5554556d3a4f7f4cfd0d5 (patch) | |
tree | 22fc10679131c72993615d0fa634460d14a15ec8 /sal | |
parent | 076b098ddf80fc78773d3ed97b7fd50dbcb4ebb6 (diff) |
convert all remaining BOOST_STATIC_ASSERT to static_assert
and we can include a few less headers
Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
Diffstat (limited to 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 3 | ||||
-rw-r--r-- | sal/rtl/strtmpl.cxx | 5 | ||||
-rw-r--r-- | sal/textenc/tables.cxx | 8 |
3 files changed, 6 insertions, 10 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 59aee5ac053f..2e791f240d7a 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -49,7 +49,6 @@ #include "boost/noncopyable.hpp" #include <boost/scoped_array.hpp> -#include "boost/static_assert.hpp" namespace { @@ -69,7 +68,7 @@ rtl::OUString getArgument(sal_Int32 index) { std::string convertLazy(rtl::OUString const & s16) { rtl::OString s8(rtl::OUStringToOString(s16, osl_getThreadTextEncoding())); - BOOST_STATIC_ASSERT(sizeof (sal_Int32) <= sizeof (std::string::size_type)); + static_assert(sizeof (sal_Int32) <= sizeof (std::string::size_type), "must be at least the same size"); // ensure following cast is legitimate return std::string( s8.getStr(), static_cast< std::string::size_type >(s8.getLength())); diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index 6b9265895064..a50c3641949d 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -30,7 +30,6 @@ #include <wchar.h> #include <sal/log.hxx> #include <rtl/character.hxx> -#include <boost/static_assert.hpp> /* inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* pDest, @@ -957,7 +956,7 @@ namespace { template<typename T, typename U> static inline T IMPL_RTL_STRNAME( toInt )( const IMPL_RTL_STRCODE* pStr, sal_Int16 nRadix ) { - BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_signed); + static_assert(std::numeric_limits<T>::is_signed, "is signed"); bool bNeg; sal_Int16 nDigit; U n = 0; @@ -1045,7 +1044,7 @@ namespace { template <typename T> static inline T IMPL_RTL_STRNAME( toUInt )( const IMPL_RTL_STRCODE* pStr, sal_Int16 nRadix ) { - BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed); + static_assert(!std::numeric_limits<T>::is_signed, "is not signed"); sal_Int16 nDigit; T n = 0; diff --git a/sal/textenc/tables.cxx b/sal/textenc/tables.cxx index 1c8462c53523..4468bbb900eb 100644 --- a/sal/textenc/tables.cxx +++ b/sal/textenc/tables.cxx @@ -24,8 +24,6 @@ #include <cassert> #include <cstddef> -#include <boost/static_assert.hpp> - #include "rtl/textenc.h" #include "sal/types.h" @@ -261,9 +259,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT ImplTextEncodingData const * &aImplPT154TextEncodingData, /* PT154 */ &adobeDingbatsEncodingData }; /* ADOBE_DINGBATS */ - //update table above if a new encoding is added - BOOST_STATIC_ASSERT( - SAL_N_ELEMENTS(aData) == RTL_TEXTENCODING_ADOBE_DINGBATS + 1); + static_assert( + SAL_N_ELEMENTS(aData) == RTL_TEXTENCODING_ADOBE_DINGBATS + 1, + "update table above if a new encoding is added"); return nEncoding < SAL_N_ELEMENTS(aData) ? aData[nEncoding] : NULL; |