Changeset 4524


Ignore:
Timestamp:
Feb 27, 2015, 9:59:31 AM (4 years ago)
Author:
nmedfort
Message:

Safer use of initializer_list

Location:
icGREP/icgrep-devel/icgrep/pablo
Files:
4 edited

Legend:

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

    r4521 r4524  
    378378}
    379379
    380 If * PabloBlock::createIf(PabloAST * condition, std::initializer_list<Assign *> definedVars, PabloBlock & body) {
     380If * PabloBlock::createIf(PabloAST * condition, const std::initializer_list<Assign *> definedVars, PabloBlock & body) {
    381381    assert (condition);
    382     return insertAtInsertionPoint(new If(condition, std::move(definedVars), body, this));
     382    return insertAtInsertionPoint(new If(condition, definedVars, body, this));
    383383}
    384384
  • icGREP/icgrep-devel/icgrep/pablo/codegenstate.h

    r4521 r4524  
    142142    PabloAST * createSel(PabloAST * condition, PabloAST * trueExpr, PabloAST * falseExpr, const std::string prefix);
    143143
    144     If * createIf(PabloAST * condition, std::initializer_list<Assign *> definedVars, PabloBlock & body);
     144    If * createIf(PabloAST * condition, const std::initializer_list<Assign *> definedVars, PabloBlock & body);
    145145
    146146    If * createIf(PabloAST * condition, const std::vector<Assign *> & definedVars, PabloBlock & body);
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.cpp

    r4511 r4524  
    55namespace pablo {
    66
    7 If::If(PabloAST * expr, std::initializer_list<Assign *> && definedVars, PabloBlock & body, PabloBlock * parent)
     7If::If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock & body, PabloBlock * parent)
    88: Statement(ClassTypeId::If, {expr}, nullptr, parent)
    99, mBody(body)
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.h

    r4511 r4524  
    5454    }
    5555protected:
    56     If(PabloAST * expr, std::initializer_list<Assign *> && definedVars, PabloBlock & body, PabloBlock * parent);
     56    If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock & body, PabloBlock * parent);
    5757
    5858    If(PabloAST * expr, const std::vector<Assign *> & definedVars, PabloBlock & body, PabloBlock * parent);
Note: See TracChangeset for help on using the changeset viewer.