diff options
Diffstat (limited to 'traveler/AsciiTraveler.cc')
| -rw-r--r-- | traveler/AsciiTraveler.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/traveler/AsciiTraveler.cc b/traveler/AsciiTraveler.cc index db4088d..b20e53b 100644 --- a/traveler/AsciiTraveler.cc +++ b/traveler/AsciiTraveler.cc @@ -10,8 +10,7 @@ const size_t AsciiTraveler::LevelWidth_ = AsciiTraveler::AsciiTraveler(std::ostream& out) : Traveler(out) - , prefix_("") - , level_(0) { + , prefix_("") { IsLastChild_.push(true); } @@ -38,19 +37,16 @@ Traveler& AsciiTraveler::operator<<(TravelPart part) { prefix_.append(IsLastChild_.top() ? LastChildPrefix_ : MiddleChildPrefix_); IsLastChild_.push(false); - ++level_; break; case TravelPart::LAST_CHILD_BEGIN: prefix_.append(IsLastChild_.top() ? LastChildPrefix_ : MiddleChildPrefix_); IsLastChild_.push(true); - ++level_; break; case TravelPart::CHILD_END: case TravelPart::LAST_CHILD_END: prefix_.erase(prefix_.size() - LevelWidth_); IsLastChild_.pop(); - --level_; break; case TravelPart::END: break; |
