diff options
author | Marc Laukien <marc@zeroc.com> | 2001-07-20 22:57:41 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-07-20 22:57:41 +0000 |
commit | 2b2436329c1a2be435dec34101350c22daa0b8e3 (patch) | |
tree | 496486ae2980aa4fbc1b34d84310abfde71605d2 /cpp/src/Slice/OutputUtil.cpp | |
parent | started with slice2docbook; removed slice2html (diff) | |
download | ice-2b2436329c1a2be435dec34101350c22daa0b8e3.tar.bz2 ice-2b2436329c1a2be435dec34101350c22daa0b8e3.tar.xz ice-2b2436329c1a2be435dec34101350c22daa0b8e3.zip |
more docbook stuff
Diffstat (limited to 'cpp/src/Slice/OutputUtil.cpp')
-rw-r--r-- | cpp/src/Slice/OutputUtil.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/src/Slice/OutputUtil.cpp b/cpp/src/Slice/OutputUtil.cpp index 1d94d0c3713..091c5e7bfec 100644 --- a/cpp/src/Slice/OutputUtil.cpp +++ b/cpp/src/Slice/OutputUtil.cpp @@ -31,7 +31,6 @@ Separator sp; Slice::Output::Output() : pos_(0), indent_(0), - indentSave_(-1), separator_(true) { } @@ -39,7 +38,6 @@ Slice::Output::Output() Slice::Output::Output(const char* s) : pos_(0), indent_(0), - indentSave_(-1), separator_(true) { open(s); @@ -83,25 +81,23 @@ Slice::Output::dec() void Slice::Output::useCurrentPosAsIndent() { - assert(indentSave_ == -1); - indentSave_ = indent_; + indentSave_.push(indent_); indent_ = pos_; } void Slice::Output::zeroIndent() { - assert(indentSave_ == -1); - indentSave_ = indent_; + indentSave_.push(indent_); indent_ = 0; } void Slice::Output::restoreIndent() { - assert(indentSave_ != -1); - indent_ = indentSave_; - indentSave_ = -1; + assert(!indentSave_.empty()); + indent_ = indentSave_.top(); + indentSave_.pop(); } void |