Ignore:
Timestamp:
Nov 14, 2015, 5:38:36 PM (4 years ago)
Author:
nmedfort
Message:

Bug fix for Multiplexing. Added ability to set the body of a If/While? node after creation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.cpp

    r4868 r4870  
    55namespace pablo {
    66
    7 If::If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock & body)
     7If::If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock * body)
    88: Statement(ClassTypeId::If, {expr}, nullptr)
    99, mBody(body)
     
    2727}
    2828
    29 If::If(PabloAST * expr, const std::vector<Assign *> & definedVars, PabloBlock & body)
     29If::If(PabloAST * expr, const std::vector<Assign *> & definedVars, PabloBlock * body)
    3030: Statement(ClassTypeId::If, {expr}, nullptr)
    3131, mBody(body)
     
    5656}
    5757
     58PabloBlock * If::setBody(PabloBlock * body) {
     59    body->setParent(mBody->getParent());
     60    std::swap(mBody, body);
     61    body->setParent(nullptr);
     62    return body;
    5863}
     64
     65}
Note: See TracChangeset for help on using the changeset viewer.