[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user