Changeset 9:f909044a9f7b in rrlib_rtti_conversion for tStaticCastOperation.h


Ignore:
Timestamp:
22.09.2017 01:26:15 (2 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds option to specify type conversions operations that are not usually combined (you could call combinations deprecated) and fixes various bugs found with unit test in finroc_plugins_runtime_construction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tStaticCastOperation.h

    r7 r9  
    126126    static size_t ComputePointerSourceOffset() 
    127127    { 
    128       const TSource source_object; 
    129       const TDestination& returned_object = static_cast<TDestination&>(source_object); 
     128      const TSource source_object = TSource(); 
     129      const TDestination& returned_object = static_cast<const TDestination&>(source_object); 
    130130      size_t difference = reinterpret_cast<const char*>(&returned_object) - reinterpret_cast<const char*>(&source_object); 
    131131      assert(difference + sizeof(TDestination) <= sizeof(TSource)); 
Note: See TracChangeset for help on using the changeset viewer.