[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2024-06-24 03:34:12 +00:00
parent 3c3709cb5d
commit ef6cd173eb
3 changed files with 13 additions and 11 deletions

View File

@@ -264,8 +264,8 @@ bool Base::XMLReader::isEndOfDocument() const
void Base::XMLReader::readEndElement(const char* ElementName, int level)
{
// if we are already at the end of the current element
if ( (ReadType == EndElement || ReadType == StartEndElement) && ElementName && LocalName == ElementName
&& (level < 0 || level == Level)) {
if ((ReadType == EndElement || ReadType == StartEndElement) && ElementName
&& LocalName == ElementName && (level < 0 || level == Level)) {
return;
}
if (ReadType == EndDocument) {

View File

@@ -320,8 +320,9 @@ void Writer::decInd()
indBuf[indent] = '\0';
}
void Writer::putNextEntry(const char *file, const char *obj) {
ObjectName = obj?obj:file;
void Writer::putNextEntry(const char* file, const char* obj)
{
ObjectName = obj ? obj : file;
}
// ----------------------------------------------------------------------------
@@ -350,8 +351,9 @@ ZipWriter::ZipWriter(std::ostream& os)
ZipStream.setf(ios::fixed, ios::floatfield);
}
void ZipWriter::putNextEntry(const char *file, const char *obj) {
Writer::putNextEntry(file,obj);
void ZipWriter::putNextEntry(const char* file, const char* obj)
{
Writer::putNextEntry(file, obj);
ZipStream.putNextEntry(file);
}
@@ -384,9 +386,9 @@ FileWriter::FileWriter(const char* DirName)
FileWriter::~FileWriter() = default;
void FileWriter::putNextEntry(const char* file, const char *obj)
void FileWriter::putNextEntry(const char* file, const char* obj)
{
Writer::putNextEntry(file,obj);
Writer::putNextEntry(file, obj);
std::string fileName = DirName + "/" + file;
this->FileStream.open(fileName.c_str(), std::ios::out | std::ios::binary);

View File

@@ -69,7 +69,7 @@ public:
int getFileVersion() const;
/// put the next entry with a give name
virtual void putNextEntry(const char *filename, const char *objName=nullptr);
virtual void putNextEntry(const char* filename, const char* objName = nullptr);
/// insert a file as CDATA section in the XML file
void insertAsciiFile(const char* FileName);
@@ -209,7 +209,7 @@ public:
{
ZipStream.setLevel(level);
}
void putNextEntry(const char *filename, const char *objName=nullptr) override;
void putNextEntry(const char* filename, const char* objName = nullptr) override;
ZipWriter(const ZipWriter&) = delete;
ZipWriter(ZipWriter&&) = delete;
@@ -256,7 +256,7 @@ public:
explicit FileWriter(const char* DirName);
~FileWriter() override;
void putNextEntry(const char *filename, const char *objName=nullptr) override;
void putNextEntry(const char* filename, const char* objName = nullptr) override;
void writeFiles() override;
std::ostream& Stream() override