diff --git a/src/Mod/Fem/App/FemMeshProperty.cpp b/src/Mod/Fem/App/FemMeshProperty.cpp index 716bfef30a..847ad209af 100644 --- a/src/Mod/Fem/App/FemMeshProperty.cpp +++ b/src/Mod/Fem/App/FemMeshProperty.cpp @@ -74,7 +74,7 @@ const FemMesh &PropertyFemMesh::getValue()const const Data::ComplexGeoData* PropertyFemMesh::getComplexData() const { - return (FemMesh*)_FemMesh; + return static_cast(_FemMesh); } Base::BoundBox3d PropertyFemMesh::getBoundingBox() const diff --git a/src/Mod/Fem/App/HypothesisPy.cpp b/src/Mod/Fem/App/HypothesisPy.cpp index dd0a60e001..971e871de7 100755 --- a/src/Mod/Fem/App/HypothesisPy.cpp +++ b/src/Mod/Fem/App/HypothesisPy.cpp @@ -135,7 +135,7 @@ Py::Object SMESH_HypothesisPy::repr() template Py::Object SMESH_HypothesisPy::setLibName(const Py::Tuple& args) { - std::string libName = (std::string)Py::String(args[0]); + std::string libName = static_cast(Py::String(args[0])); hypothesis()->SetLibName(libName.c_str()); return Py::None(); } @@ -153,7 +153,7 @@ Py::Object SMESH_HypothesisPy::getLibName(const Py::Tuple& args) template Py::Object SMESH_HypothesisPy::setParameters(const Py::Tuple& args) { - std::string paramName = (std::string)Py::String(args[0]); + std::string paramName = static_cast(Py::String(args[0])); hypothesis()->SetParameters(paramName.c_str()); return Py::None(); } @@ -171,7 +171,7 @@ Py::Object SMESH_HypothesisPy::setLastParameters(const Py::Tuple& args) { if (!PyArg_ParseTuple(args.ptr(), "")) throw Py::Exception(); - std::string paramName = (std::string)Py::String(args[0]); + std::string paramName = static_cast(Py::String(args[0])); hypothesis()->SetLastParameters(paramName.c_str()); return Py::None(); }