fix -Wignored-qualifiers
This commit is contained in:
@@ -479,7 +479,7 @@ void PropertyFileIncluded::SaveDocFile (Base::Writer &writer) const
|
||||
unsigned char c;
|
||||
std::ostream& to = writer.Stream();
|
||||
while (from.get((char&)c)) {
|
||||
to.put((const char)c);
|
||||
to.put((char)c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ void PropertyFileIncluded::RestoreDocFile(Base::Reader &reader)
|
||||
aboutToSetValue();
|
||||
unsigned char c;
|
||||
while (reader.get((char&)c)) {
|
||||
to.put((const char)c);
|
||||
to.put((char)c);
|
||||
}
|
||||
to.close();
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ private:
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP");
|
||||
|
||||
makeHeader.SetName(new TCollection_HAsciiString((const Standard_CString)Utf8Name.c_str()));
|
||||
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
|
||||
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
|
||||
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));
|
||||
|
||||
@@ -541,11 +541,11 @@ private:
|
||||
// the App Code.
|
||||
std::vector< std::vector<App::Color> > Colors;
|
||||
get_parts_colors(hierarchical_part,FreeLabels,part_id,Colors);
|
||||
ocaf.reallocateFreeShape(hierarchical_part,FreeLabels,part_id,Colors);
|
||||
|
||||
#if OCC_VERSION_HEX >= 0x070200
|
||||
// Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055
|
||||
XCAFDoc_DocumentTool::ShapeTool(hDoc->Main())->UpdateAssemblies();
|
||||
ocaf.reallocateFreeShape(hierarchical_part,FreeLabels,part_id,Colors);
|
||||
|
||||
#if OCC_VERSION_HEX >= 0x070200
|
||||
// Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055
|
||||
XCAFDoc_DocumentTool::ShapeTool(hDoc->Main())->UpdateAssemblies();
|
||||
#endif
|
||||
|
||||
Base::FileInfo file(Utf8Name.c_str());
|
||||
@@ -571,7 +571,7 @@ private:
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP");
|
||||
|
||||
makeHeader.SetName(new TCollection_HAsciiString((const Standard_CString)(Utf8Name.c_str())));
|
||||
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(Utf8Name.c_str())));
|
||||
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
|
||||
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));
|
||||
|
||||
@@ -57,7 +57,7 @@ App::DocumentObjectExecReturn *CurveNet::execute(void)
|
||||
}
|
||||
|
||||
TopoShape aShape;
|
||||
aShape.read((const Standard_CString)FileName.getValue());
|
||||
aShape.read(FileName.getValue());
|
||||
this->Shape.setValue(aShape);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
@@ -59,7 +59,7 @@ App::DocumentObjectExecReturn *ImportBrep::execute(void)
|
||||
}
|
||||
|
||||
TopoShape aShape;
|
||||
aShape.importBrep((const Standard_CString)FileName.getValue());
|
||||
aShape.importBrep(FileName.getValue());
|
||||
this->Shape.setValue(aShape);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
@@ -59,7 +59,7 @@ App::DocumentObjectExecReturn *ImportIges::execute(void)
|
||||
}
|
||||
|
||||
TopoShape aShape;
|
||||
aShape.importIges((const Standard_CString)FileName.getValue());
|
||||
aShape.importIges(FileName.getValue());
|
||||
this->Shape.setValue(aShape);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
@@ -58,7 +58,7 @@ App::DocumentObjectExecReturn *ImportStep::execute(void)
|
||||
}
|
||||
|
||||
TopoShape aShape;
|
||||
aShape.importStep((const Standard_CString)FileName.getValue());
|
||||
aShape.importStep(FileName.getValue());
|
||||
this->Shape.setValue(aShape);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
@@ -78,7 +78,7 @@ int Part::ImportIgesParts(App::Document *pcDoc, const char* FileName)
|
||||
Message_MsgFile::LoadFromEnv("CSF_SHMessageStd","SHAPEStd");
|
||||
|
||||
IGESControl_Reader aReader;
|
||||
if (aReader.ReadFile((const Standard_CString)FileName) != IFSelect_RetDone)
|
||||
if (aReader.ReadFile((Standard_CString)FileName) != IFSelect_RetDone)
|
||||
throw Base::Exception("Error in reading IGES");
|
||||
|
||||
// Ignore construction elements
|
||||
|
||||
@@ -333,7 +333,7 @@ void PropertyPartShape::SaveDocFile (Base::Writer &writer) const
|
||||
// we may run into some problems on the Linux platform
|
||||
static Base::FileInfo fi(App::Application::getTempFileName());
|
||||
|
||||
if (!BRepTools_Write(myShape,(const Standard_CString)fi.filePath().c_str())) {
|
||||
if (!BRepTools_Write(myShape,(Standard_CString)fi.filePath().c_str())) {
|
||||
// Note: Do NOT throw an exception here because if the tmp. file could
|
||||
// not be created we should not abort.
|
||||
// We only print an error message but continue writing the next files to the
|
||||
@@ -412,7 +412,7 @@ void PropertyPartShape::RestoreDocFile(Base::Reader &reader)
|
||||
// If it's still empty after reading the (non-empty) file there must occurred an error.
|
||||
TopoDS_Shape shape;
|
||||
if (ulSize > 0) {
|
||||
if (!BRepTools::Read(shape, (const Standard_CString)fi.filePath().c_str(), builder)) {
|
||||
if (!BRepTools::Read(shape, (Standard_CString)fi.filePath().c_str(), builder)) {
|
||||
// Note: Do NOT throw an exception here because if the tmp. created file could
|
||||
// not be read it's NOT an indication for an invalid input stream 'reader'.
|
||||
// We only print an error message but continue reading the next files from the
|
||||
|
||||
@@ -714,7 +714,7 @@ void TopoShape::exportStep(const char *filename) const
|
||||
throw Base::Exception("Error in transferring STEP");
|
||||
|
||||
APIHeaderSection_MakeHeader makeHeader(aWriter.Model());
|
||||
makeHeader.SetName(new TCollection_HAsciiString((const Standard_CString)(encodeFilename(filename).c_str())));
|
||||
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str())));
|
||||
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString("FreeCAD"));
|
||||
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString("FreeCAD"));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString("FreeCAD"));
|
||||
|
||||
Reference in New Issue
Block a user