refactor: 2 pull bools to 1 enum; remove gate backptr

This commit is contained in:
Christopher Mosher
2013-12-15 00:03:46 -05:00
parent 48249ccb60
commit da174b54cd
5 changed files with 46 additions and 25 deletions

View File

@@ -27,10 +27,9 @@ static void pHexw(const unsigned short x) {
void Trace::dumpSegments() const {
for (auto sp : this->s) {
Segment* seg = sp.second.get();
assert(!(seg->pullup && seg->pulldown));
if (seg->pullup) {
if (seg->pull == Pull::UP) {
std::cout << (seg->on ? "U" : "u");
} else if (seg->pulldown) {
} else if (seg->pull == Pull::DOWN) {
std::cout << (seg->on ? "D" : "d");
} else {
std::cout << (seg->on ? "F" : "f");