Changeset 6:a45181a6d1f2 in rrlib_rtti_conversion


Ignore:
Timestamp:
11.08.2017 10:13:09 (22 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes deserialization of conversion operation sequences with parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tConversionOperationSequence.cpp

    r5 r6  
    528528      if (flags & cPARAMETER) 
    529529      { 
    530         tType type; 
    531         stream >> type; 
    532         if ((!sequence.operations[i].parameter) || (sequence.operations[i].parameter->GetType() != type)) 
     530        if ((!sequence.operations[i].operation) || (!sequence.operations[i].operation->Parameter().GetType())) 
    533531        { 
    534           sequence.operations[i].parameter.reset(type.CreateGenericObject()); 
     532          throw std::runtime_error("No parameter defined in conversion operation to deserialize"); 
     533        } 
     534        if ((!sequence.operations[i].parameter)) 
     535        { 
     536          sequence.operations[i].parameter.reset(sequence.operations[i].operation->Parameter().GetType().CreateGenericObject()); 
    535537        } 
    536538        sequence.operations[i].parameter->Deserialize(stream); 
Note: See TracChangeset for help on using the changeset viewer.