This commit disables default constructor of Step, and explicitly requires
Instr on construction.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
class Step final
{
public:
- Step() = default;
+ explicit Step(Instr *instr) : _instr{instr}
+ {
+ // DO NOTHING
+ }
public:
~Step() { op(nullptr); }
public:
Instr *instr(void) const { return _instr; }
- void instr(Instr *i) { _instr = i; }
private:
Op *_op = nullptr;
class UnitF final : public FeatureInstr
{
public:
- UnitF() { _step.instr(this); }
+ UnitF() : _step{this}
+ {
+ // DO NOTHING
+ }
public:
UnitF *asUnitF(void) override { return this; }
namespace coco
{
-Eval::Eval() : _out{this}
+Eval::Eval() : _out{this}, _step{this}
{
// DO NOTHING
}