Ignore:
Timestamp:
Sep 22, 2017, 3:36:36 PM (2 years ago)
Author:
nmedfort
Message:

Minor bug fixes and removal of inadvertent check in for StreamSet?.cpp/h

File:
1 edited

Legend:

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

    r5510 r5647  
    461461        iterator(Statement* base): mCurrent(base) {}
    462462
    463         iterator(const iterator& other): mCurrent(other.mCurrent) {}
    464 
    465         const iterator& operator=(const iterator& other) {
    466             mCurrent = other.mCurrent; return other;
     463        iterator(const iterator & other): mCurrent(other.mCurrent) {}
     464
     465        iterator & operator=(const iterator & other) {
     466            mCurrent = other.mCurrent;
     467            return *this;
    467468        }
    468469
     
    473474        }
    474475
    475         iterator  operator++(int) {
     476        iterator operator++(int) {
    476477            iterator tmp(*this);
    477478            ++(*this);
     
    479480        }
    480481
    481         bool operator==(const iterator& other) const {
     482        bool operator==(const iterator & other) const {
    482483            return  mCurrent == other.mCurrent;
    483484        }
    484485
    485         bool operator!=(const iterator& other) const {
     486        bool operator!=(const iterator & other) const {
    486487            return  mCurrent != other.mCurrent;
    487488        }
     
    500501        const_iterator(const Statement* base): mCurrent(base) {}
    501502        const_iterator(const const_iterator& other): mCurrent(other.mCurrent) {}
    502         const const_iterator& operator=(const const_iterator& other) {mCurrent = other.mCurrent; return other;}
     503        const_iterator& operator=(const const_iterator & other) {
     504            mCurrent = other.mCurrent;
     505            return *this;
     506        }
    503507
    504508        inline const_iterator& operator++() {
     
    537541        reverse_iterator(const reverse_iterator& other): mCurrent(other.mCurrent) {}
    538542
    539         const reverse_iterator& operator=(const reverse_iterator& other) {
    540             mCurrent = other.mCurrent; return other;
     543        reverse_iterator & operator=(const reverse_iterator & other) {
     544            mCurrent = other.mCurrent;
     545            return *this;
    541546        }
    542547
     
    573578        const_reverse_iterator(): mCurrent(nullptr) {}
    574579        const_reverse_iterator(const Statement* base): mCurrent(base) {}
    575         const_reverse_iterator(const const_reverse_iterator& other): mCurrent(other.mCurrent) {}
    576         const const_reverse_iterator& operator=(const const_reverse_iterator& other) {mCurrent = other.mCurrent; return other;}
     580        const_reverse_iterator(const const_reverse_iterator & other): mCurrent(other.mCurrent) {}
     581
     582        const_reverse_iterator& operator=(const const_reverse_iterator & other) {
     583            mCurrent = other.mCurrent;
     584            return *this;
     585        }
    577586
    578587        inline const_reverse_iterator& operator++() {
     
    686695    }
    687696
    688     bool contains(Statement * const statement);
     697    bool contains(const Statement * const statement) const;
    689698
    690699protected:
Note: See TracChangeset for help on using the changeset viewer.