From 4fa8282816cb39692678e9da6b6693e821a3039b Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 13 Sep 2014 20:20:45 +0200 Subject: mac: clean-up obsolete conditional code based on old SDK Change-Id: Ie2d476780a48b5815961598e214343d5def962c1 --- .../source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 30 ++-------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx') diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx index 83b06c5161f3..f224c22b57cf 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx @@ -27,13 +27,6 @@ #include -// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined -// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but -// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does: -#if MACOSX_SDK_VERSION < 1070 -#include -#endif - #include "boost/static_assert.hpp" #include "boost/unordered_map.hpp" #include "com/sun/star/uno/RuntimeException.hpp" @@ -63,32 +56,17 @@ struct Fake_class_type_info: Fake_type_info { virtual ~Fake_class_type_info() SAL_DELETED_FUNCTION; }; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info)); -#endif - struct Fake_si_class_type_info: Fake_class_type_info { virtual ~Fake_si_class_type_info() SAL_DELETED_FUNCTION; void const * base; }; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_si_class_type_info) - == sizeof (__cxxabiv1::__si_class_type_info)); -#endif - struct Base {}; struct Derived: Base {}; std::type_info * createFake_class_type_info(char const * name) { char * buf = new char[sizeof (Fake_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base)) - != 0); -#endif + *reinterpret_cast(buf) = *reinterpret_cast( &typeid(Base)); // copy __cxxabiv1::__class_type_info vtable into place @@ -102,11 +80,7 @@ std::type_info * createFake_si_class_type_info( char const * name, std::type_info const * base) { char * buf = new char[sizeof (Fake_si_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__si_class_type_info const *>(&typeid(Derived)) - != 0); -#endif + *reinterpret_cast(buf) = *reinterpret_cast( &typeid(Derived)); // copy __cxxabiv1::__si_class_type_info vtable into place -- cgit