Ignore:
Timestamp:
09/15/14 16:17:28 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removed ALL dynamic casts, now change the template shared/Numerics/recast.h to change back to dynamic_casts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Numerics/recast.h

    r14975 r18521  
    4040#endif
    4141
     42/*Morlighem's change: we do not want dynamic_casts because of performance
     43 * issue, so for now, we just use C-like cast*/
     44template<class To,class From> To xDynamicCast(const From& from) {
     45
     46        /*C-like cast (fast but not safe)*/
     47        return (To) from;
     48
     49        /*C++ dynamic_cast, poor performance but safer*/
     50        //return dynamic_cast<To>(from);
     51}
     52
    4253#endif
Note: See TracChangeset for help on using the changeset viewer.