Changeset 28:0d9e9fd957de in finroc_plugins_composite_ports


Ignore:
Timestamp:
13.04.2021 10:30:23 (8 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
default
Phase:
public
Tags:
tip
Message:

Fixes GetFullInterfaceType and GetPartialInterfaceType functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interface_types.h

    r27 r28  
    7171 * \return Full interface type if type is a port composite interface type - possibly a partial interface type 
    7272 */ 
    73 inline bool GetFullInterfaceType(const rrlib::rtti::tType& type) 
     73inline rrlib::rtti::tType GetFullInterfaceType(const rrlib::rtti::tType& type) 
    7474{ 
    75   return IsInterfaceType(type) && static_cast<const internal::tInterfaceTypeInfo&>(type.SharedTypeInfo()).GetFullType(); 
     75  return IsInterfaceType(type) ? static_cast<const internal::tInterfaceTypeInfo&>(type.SharedTypeInfo()).GetFullType() : rrlib::rtti::tType(); 
    7676} 
    7777 
     
    8080 * \return Partial interface type if type is a port composite interface type with a partial interface type 
    8181 */ 
    82 inline bool GetPartialInterfaceType(const rrlib::rtti::tType& type) 
     82inline rrlib::rtti::tType GetPartialInterfaceType(const rrlib::rtti::tType& type) 
    8383{ 
    84   return IsInterfaceType(type) && static_cast<const internal::tInterfaceTypeInfo&>(type.SharedTypeInfo()).GetPartialType(); 
     84  return IsInterfaceType(type) ? static_cast<const internal::tInterfaceTypeInfo&>(type.SharedTypeInfo()).GetPartialType() : rrlib::rtti::tType(); 
    8585} 
    8686 
Note: See TracChangeset for help on using the changeset viewer.