Base: fix google-explicit-constructor

This commit is contained in:
wmayer
2023-11-22 19:48:10 +01:00
committed by wwmayer
parent b239797b3e
commit dcd533af4b
16 changed files with 93 additions and 91 deletions

View File

@@ -155,7 +155,7 @@ void Exporter::throwIfNoPermission(const std::string& filename)
Base::FileInfo fi(filename);
Base::FileInfo di(fi.dirPath());
if ((fi.exists() && !fi.isWritable()) || !di.exists() || !di.isWritable()) {
throw Base::FileException("No write permission for file", filename);
throw Base::FileException("No write permission for file", fi);
}
}

View File

@@ -214,7 +214,7 @@ void PointKernel::RestoreDocFile(Base::Reader& reader)
void PointKernel::save(const char* file) const
{
Base::ofstream out(file, std::ios::out);
Base::ofstream out(Base::FileInfo(file), std::ios::out);
save(out);
}

View File

@@ -1981,7 +1981,7 @@ void PlyWriter::write(const std::string& filename)
col += 1;
}
Base::ofstream out(filename, std::ios::out);
Base::ofstream out(Base::FileInfo(filename), std::ios::out);
out << "ply" << std::endl
<< "format ascii 1.0" << std::endl
<< "comment FreeCAD generated" << std::endl;
@@ -2130,7 +2130,7 @@ void PcdWriter::write(const std::string& filename)
}
std::size_t numFields = fields.size();
Base::ofstream out(filename, std::ios::out);
Base::ofstream out(Base::FileInfo(filename), std::ios::out);
out << "# .PCD v0.7 - Point Cloud Data file format" << std::endl << "VERSION 0.7" << std::endl;
// the fields