Ignore:
Timestamp:
Dec 23, 2015, 4:28:42 PM (3 years ago)
Author:
nmedfort
Message:

Work on lowering + minor bug fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.h

    r4896 r4899  
    110110    }
    111111
    112     void replaceAllUsesWith(PabloAST * expr);
     112    void replaceAllUsesWith(PabloAST * const expr);
    113113
    114114    inline Users::size_type getNumUses() const {
     
    131131
    132132    }
    133     void addUser(PabloAST * user);
    134     void removeUser(PabloAST * user);
     133    void addUser(PabloAST * const user);
     134    void removeUser(PabloAST * const user);
    135135    virtual ~PabloAST() {
    136136        mUsers.clear();
     
    604604 * @brief addUser
    605605 ** ------------------------------------------------------------------------------------------------------------- */
    606 inline void PabloAST::addUser(PabloAST *user) {
     606inline void PabloAST::addUser(PabloAST * const user) {
    607607    assert (user);   
    608     // Note: for the rare situation that this node is used multiple times by a statement, duplicates are allowed.
     608    // Note: for the rare situation that this node is used multiple times by the same statement, duplicates are allowed.
    609609    mUsers.insert(std::lower_bound(mUsers.begin(), mUsers.end(), user), user);
    610610}
     
    613613 * @brief removeUser
    614614 ** ------------------------------------------------------------------------------------------------------------- */
    615 inline void PabloAST::removeUser(PabloAST * user) {
     615inline void PabloAST::removeUser(PabloAST * const user) {
    616616    assert (user);
    617     auto pos = std::lower_bound(mUsers.begin(), mUsers.end(), user);
     617    const auto pos = std::lower_bound(mUsers.begin(), mUsers.end(), user);
    618618    assert ("Could not find user to remove!" && (pos != mUsers.end() && *pos == user));
    619619    mUsers.erase(pos);
Note: See TracChangeset for help on using the changeset viewer.