Import: fix lint warnings
* Make constructors explicit * Fix a regression from PR 10783
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <sstream>
|
||||
#include <Standard_Version.hxx>
|
||||
#include <TColStd_IndexedDataMapOfStringString.hxx>
|
||||
#if OCC_VERSION_HEX >= 0x070500
|
||||
@@ -35,16 +34,19 @@
|
||||
|
||||
#include "WriterGltf.h"
|
||||
#include <Base/Exception.h>
|
||||
#include <Mod/Part/App/encodeFilename.h>
|
||||
|
||||
using namespace Import;
|
||||
|
||||
WriterGltf::WriterGltf(std::string name8bit, const Base::FileInfo& file) // NOLINT
|
||||
: name8bit {std::move(name8bit)}
|
||||
, file {file}
|
||||
WriterGltf::WriterGltf(const Base::FileInfo& file) // NOLINT
|
||||
: file {file}
|
||||
{}
|
||||
|
||||
void WriterGltf::write(Handle(TDocStd_Document) hDoc) const // NOLINT
|
||||
{
|
||||
std::string utf8Name = file.filePath();
|
||||
std::string name8bit = Part::encodeFilename(utf8Name);
|
||||
|
||||
#if OCC_VERSION_HEX >= 0x070500
|
||||
TColStd_IndexedDataMapOfStringString aMetadata;
|
||||
RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb"));
|
||||
@@ -57,9 +59,7 @@ void WriterGltf::write(Handle(TDocStd_Document) hDoc) const // NOLINT
|
||||
#endif
|
||||
Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange());
|
||||
if (!ret) {
|
||||
std::stringstream str;
|
||||
str << "Cannot save to file '"
|
||||
<< "" << file.filePath() << "'";
|
||||
throw Base::FileException("Cannot save to file: ", file);
|
||||
}
|
||||
#else
|
||||
throw Base::RuntimeError("gITF support requires OCCT 7.5.0 or later");
|
||||
|
||||
Reference in New Issue
Block a user