diff options
Diffstat (limited to 'Gate.cpp')
-rw-r--r-- | Gate.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -40,7 +40,6 @@ Gate::remove_output_gate_id(int id) { if (id == (*g)) { - printf("%id = %d\n", id, *g); output_gate_ids.erase(output_gate_ids.begin() + pos); break; } @@ -48,6 +47,22 @@ Gate::remove_output_gate_id(int id) } } +void +Gate::remove_input_gate(int id) +{ + if (input_gate1) + { + if (input_gate1->get_id() == id) + input_gate1 = nullptr; + } + + if (input_gate2) + { + if (input_gate2->get_id() == id) + input_gate2 = nullptr; + } +} + void Gate::update_state() { switch (this->gate_type) |