Ignore:
Timestamp:
Jul 7, 2015, 4:11:50 PM (4 years ago)
Author:
nmedfort
Message:

Fixed Multiplexing for new While structure/logic + Potential bug fix for PabloBuilder::Create.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/builder.hpp

    r4641 r4646  
    1010public:
    1111
    12     explicit PabloBuilder(PabloBlock & block) : mPb(&block), mParent(nullptr) {}
     12    explicit PabloBuilder(PabloBlock & block) : mPb(&block), mParent(nullptr), mExprTable(nullptr) {}
    1313
    1414    explicit PabloBuilder(PabloBlock & block, PabloBuilder & parent) : mPb(&block), mParent(&parent), mExprTable(&(parent.mExprTable)) {}
    1515
    16     PabloBuilder(const PabloBuilder &) = default;
     16    PabloBuilder(PabloBuilder && builder) : mPb(builder.mPb), mParent(builder.mParent), mExprTable(std::move(builder.mExprTable)) {}
     17
     18    PabloBuilder & operator=(PabloBuilder) = delete;
    1719
    1820    PabloBuilder & operator=(PabloBuilder &) = delete;
    1921
    20     PabloBuilder & operator=(PabloBuilder &&) = default;
     22    PabloBuilder & operator=(PabloBuilder && builder) {
     23        mPb = builder.mPb;
     24        mParent = builder.mParent;
     25        mExprTable = std::move(builder.mExprTable);
     26        return *this;
     27    }
    2128
    22     inline static PabloBuilder && Create(PabloBuilder & parent) noexcept {
     29    inline static PabloBuilder Create(PabloBuilder & parent) noexcept {
    2330        return std::move(PabloBuilder(PabloBlock::Create(*(parent.mPb)), parent));
    2431    }
Note: See TracChangeset for help on using the changeset viewer.