itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
175 stars 85 forks source link

Explicitly init variables of complex types with null literal #3084

Closed tkutz closed 4 years ago

tkutz commented 4 years ago

Fixes #3083

rherrmannr commented 4 years ago

This will not work with CDomain.

struct_t myStruct = sc_null; //compile error!

need to filter multiSM types.

tkutz commented 4 years ago

@rherrmannr Your comment should be fixed now.

rherrmannr commented 4 years ago

@tkutz for testing you can execute the CDomain generator tests

rherrmannr commented 4 years ago

I've tested this & it's working. LGTM...

void AccessVariablesGrandGrandParent::init()
{
    for (sc_ushort i = 0; i < maxOrthogonalStates; ++i)
        stateConfVector[i] = AccessVariablesGrandGrandParent_last_state;

    stateConfVectorPosition = 0;

    clearInEvents();
    clearOutEvents();

    /* Default init sequence for statechart AccessVariablesGrandGrandParent */
    iface.grandParent = sc_null;
}