summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/OutputUtil.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-07-20 22:57:41 +0000
committerMarc Laukien <marc@zeroc.com>2001-07-20 22:57:41 +0000
commit2b2436329c1a2be435dec34101350c22daa0b8e3 (patch)
tree496486ae2980aa4fbc1b34d84310abfde71605d2 /cpp/src/Slice/OutputUtil.cpp
parentstarted with slice2docbook; removed slice2html (diff)
downloadice-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.cpp14
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