Changeset 43:c764871c52fc in rrlib_rtti_conversion


Ignore:
Timestamp:
08.04.2021 06:49:41 (2 weeks ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Tags:
tip
Message:

Makes minor customization to StaticCastOperation for PORT_COMPOSITE_INTERFACE types (now always possible with a common base class)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tStaticCastOperation.cpp

    r40 r43  
    278278  } 
    279279  tCommonUnderlyingTypeResult result = GetCommonUnderlyingType(source_type, destination_type); 
    280   if (result.common_underlying_type == destination_type || (result.cast_from_common_to_destination_type_valid && (result.common_underlying_type == source_type || result.cast_from_common_to_destination_type_implicit || result.cast_from_source_to_common_type_implicit))) 
     280  if (result.common_underlying_type == destination_type || (result.cast_from_common_to_destination_type_valid && (result.common_underlying_type == source_type || result.cast_from_common_to_destination_type_implicit || result.cast_from_source_to_common_type_implicit)) || result.common_underlying_type.GetTypeClassification() == tTypeClassification::PORT_COMPOSITE_INTERFACE) 
    281281  { 
    282282    return tConversionOption(source_type, destination_type, 0); 
     
    355355  } 
    356356  tCommonUnderlyingTypeResult result = GetCommonUnderlyingType(source_type, destination_type); 
    357   if ((result.common_underlying_type == destination_type && result.cast_from_source_to_common_type_implicit) || (result.common_underlying_type == source_type && result.cast_from_common_to_destination_type_valid && result.cast_from_common_to_destination_type_implicit)) 
     357  if ((result.common_underlying_type == destination_type && result.cast_from_source_to_common_type_implicit) || (result.common_underlying_type == source_type && result.cast_from_common_to_destination_type_valid && result.cast_from_common_to_destination_type_implicit) 
     358      || (result.common_underlying_type.GetTypeClassification() == tTypeClassification::PORT_COMPOSITE_INTERFACE && result.cast_from_common_to_destination_type_implicit && result.cast_from_common_to_destination_type_valid && result.cast_from_source_to_common_type_implicit)) 
    358359  { 
    359360    return tConversionOption(source_type, destination_type, 0); 
Note: See TracChangeset for help on using the changeset viewer.