diff --git a/src/fileFormats/vtk/format/foamVtkFormatter.C b/src/fileFormats/vtk/format/foamVtkFormatter.C
index 2bb49322d3..711bcdecd2 100644
--- a/src/fileFormats/vtk/format/foamVtkFormatter.C
+++ b/src/fileFormats/vtk/format/foamVtkFormatter.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
+ \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -24,12 +24,6 @@ License
#include "foamVtkFormatter.H"
-// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
-
-Foam::vtk::formatter::~formatter()
-{}
-
-
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
std::size_t Foam::vtk::formatter::encodedLength(std::size_t n) const
@@ -95,7 +89,7 @@ Foam::vtk::formatter::openTag(const word& tagName)
indent();
os_ << '<' << tagName;
- xmlTags_.push(tagName);
+ xmlTags_.append(tagName);
inTag_ = true;
return *this;
@@ -115,7 +109,7 @@ Foam::vtk::formatter::closeTag(const bool isEmpty)
if (isEmpty)
{
// eg,
- xmlTags_.pop();
+ xmlTags_.remove();
os_ << " /";
}
os_ << '>' << nl;
@@ -129,7 +123,7 @@ Foam::vtk::formatter::closeTag(const bool isEmpty)
Foam::vtk::formatter&
Foam::vtk::formatter::endTag(const word& tagName)
{
- const word curr = xmlTags_.pop();
+ const word curr(xmlTags_.remove());
indent();
if (inTag_)
diff --git a/src/fileFormats/vtk/format/foamVtkFormatter.H b/src/fileFormats/vtk/format/foamVtkFormatter.H
index abe6e2972d..c3e9c91638 100644
--- a/src/fileFormats/vtk/format/foamVtkFormatter.H
+++ b/src/fileFormats/vtk/format/foamVtkFormatter.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
+ \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -43,7 +43,7 @@ SourceFiles
#include "label.H"
#include "word.H"
#include "UList.H"
-#include "LIFOStack.H"
+#include "DynamicList.H"
#include "foamVtkCore.H"
#include "foamVtkPTraits.H"
@@ -69,8 +69,8 @@ class formatter
//- The output stream for the formatter
std::ostream& os_;
- //- Stack of current XML tags
- LIFOStack xmlTags_;
+ //- LIFO stack of current XML tags
+ DynamicList xmlTags_;
//- Tag open/closed/ended state
mutable bool inTag_;
@@ -104,12 +104,12 @@ public:
//- Destructor
- virtual ~formatter();
+ virtual ~formatter() = default;
// Member Functions
- // Access
+ // Access
//- Access to the underlying output stream
inline std::ostream& os();
@@ -142,7 +142,7 @@ public:
// Member Functions
- // Output
+ // Output
//- Indent according to the currently nested XML tags
void indent();
@@ -317,7 +317,6 @@ public:
const uint64_t v,
const char quote = '\''
);
-
};