Import: fix lint warnings

* Make constructors explicit
* Fix a regression from PR 10783
This commit is contained in:
wmayer
2023-10-01 01:58:32 +02:00
committed by wwmayer
parent 75b313be28
commit 58cc0f2a0d
11 changed files with 26 additions and 27 deletions

View File

@@ -34,6 +34,7 @@
#include "WriterIges.h"
#include <Base/Exception.h>
#include <App/Application.h>
#include <Mod/Part/App/encodeFilename.h>
#include <Mod/Part/App/Interface.h>
using namespace Import;
@@ -44,6 +45,9 @@ WriterIges::WriterIges(const Base::FileInfo& file) // NOLINT
void WriterIges::write(Handle(TDocStd_Document) hDoc) const // NOLINT
{
std::string utf8Name = file.filePath();
std::string name8bit = Part::encodeFilename(utf8Name);
IGESControl_Controller::Init();
IGESCAFControl_Writer writer;
IGESData_GlobalSection header = writer.Model()->GlobalSection();
@@ -54,7 +58,6 @@ void WriterIges::write(Handle(TDocStd_Document) hDoc) const // NOLINT
writer.Transfer(hDoc);
Standard_Boolean ret = writer.Write(name8bit.c_str());
if (!ret) {
std::string utf8Name = file.filePath();
throw Base::FileException("Cannot open file '%s'", utf8Name.c_str());
throw Base::FileException("Cannot open file: ", file);
}
}