X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaRTTI.cxx;h=a89d2bdb8c3f789af521c73b764698ef9d714fb7;hb=fd0540f50c983b55494f9dbe67448ffb10f869fe;hp=57bf5b4f6e0e69a385922004100575215cd050dd;hpb=17824854619941a12697fea8524f4218f9a14ef9;p=crea.git diff --git a/src/creaRTTI.cxx b/src/creaRTTI.cxx index 57bf5b4..a89d2bd 100644 --- a/src/creaRTTI.cxx +++ b/src/creaRTTI.cxx @@ -4,6 +4,8 @@ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image # pour la Santé) # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, @@ -20,12 +22,12 @@ # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. -# ------------------------------------------------------------------------ */ +# ------------------------------------------------------------------------ +*/ #include "creaRTTI.h" #include "creaMessageManager.h" - namespace crea { @@ -60,44 +62,43 @@ namespace crea << " to " << TypeName(target_type) << std::endl); void* target_pointer = 0; -#if __GNUC__ > 3 || \ - (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \ - (__GNUC_MINOR__ == 1 && \ - __GNUC_PATCHLEVEL__ > 0))) - - const abi::__class_type_info* targetTI = - (const abi::__class_type_info *)( &(target_type)); + + +#if __APPLE__ + // //EED2018-08-28 Be careful #include is not complete (CommandLine mechanisme Xcode) + printf("EED creaRTTI run_time_up_or_down_cast 2018-08-28 Warnning !!!! Apple cast missing __do_upcast "); + return source_pointer; +#else + #if __GNUC__ > 3 || \ + (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \ + (__GNUC_MINOR__ == 1 && \ + __GNUC_PATCHLEVEL__ > 0))) + const abi::__class_type_info* targetTI = (const abi::__class_type_info *)( &(target_type)); creaDebugMessage("info",7," * source = "<