mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use back(), pop_back() instead remove()
- adjust looping to resemble LIFO pattern STYLE: adjust some string includes
This commit is contained in:
@ -38,7 +38,6 @@ SourceFiles
|
||||
#define FIRECore_H
|
||||
|
||||
#include "point.H"
|
||||
#include "string.H"
|
||||
#include "labelList.H"
|
||||
#include "pointField.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
@ -38,7 +38,6 @@ SourceFiles
|
||||
#define Foam_fileFormats_NASCore_H
|
||||
|
||||
#include "scalar.H"
|
||||
#include "string.H"
|
||||
#include "Enum.H"
|
||||
#include "face.H"
|
||||
#include "point.H"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -399,18 +399,17 @@ Foam::label Foam::vtk::vtmWriter::endBlock(const word& blockName)
|
||||
{
|
||||
if (!blocks_.empty())
|
||||
{
|
||||
const word curr(blocks_.remove());
|
||||
|
||||
// Verify expected end tag
|
||||
if (!blockName.empty() && blockName != curr)
|
||||
if (!blockName.empty() && blockName != blocks_.back())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "expecting to end block '" << blockName
|
||||
<< "' but found '" << curr << "' instead"
|
||||
<< "' but found '" << blocks_.back() << "' instead"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
entries_.append(vtmEntry::endblock());
|
||||
blocks_.pop_back();
|
||||
entries_.push_back(vtmEntry::endblock());
|
||||
}
|
||||
|
||||
return blocks_.size();
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -112,7 +112,7 @@ Foam::vtk::formatter& Foam::vtk::formatter::closeTag(const bool isEmpty)
|
||||
if (isEmpty)
|
||||
{
|
||||
// Eg, <tag ... />
|
||||
xmlTags_.remove();
|
||||
xmlTags_.pop_back();
|
||||
os_ << " /";
|
||||
}
|
||||
os_ << '>' << nl;
|
||||
@ -124,7 +124,8 @@ Foam::vtk::formatter& Foam::vtk::formatter::closeTag(const bool isEmpty)
|
||||
|
||||
Foam::vtk::formatter& Foam::vtk::formatter::endTag(const word& tagName)
|
||||
{
|
||||
const word curr(xmlTags_.remove());
|
||||
const word curr(std::move(xmlTags_.back()));
|
||||
xmlTags_.pop_back();
|
||||
indent();
|
||||
|
||||
if (inTag_)
|
||||
|
||||
Reference in New Issue
Block a user