Skip to content

Commit

Permalink
Re-arrange XmlMemoryBuffer fields and add explicit padding
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRStevens committed Mar 4, 2025
1 parent 35249e6 commit bf630ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NAS2D/Xml/XmlMemoryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline void line_break(const std::string& linebreak, std::string& buffer)
}


XmlMemoryBuffer::XmlMemoryBuffer() : depth(0), _indent("\t"), _lineBreak("\n")
XmlMemoryBuffer::XmlMemoryBuffer() : _indent("\t"), _lineBreak("\n"), depth(0)
{}


Expand Down
5 changes: 3 additions & 2 deletions NAS2D/Xml/XmlMemoryBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ class XmlMemoryBuffer : public XmlVisitor
const std::string& buffer();

private:
int depth;

std::string _buffer{};
std::string _indent;
std::string _lineBreak;
int depth;
protected:
int _padding{};
};

} // namespace Xml
Expand Down

0 comments on commit bf630ff

Please sign in to comment.