diff --git a/src/Mod/CAM/PathSimulator/App/VolSim.cpp b/src/Mod/CAM/PathSimulator/App/VolSim.cpp index 2a6164e8d9..7a70749b6c 100644 --- a/src/Mod/CAM/PathSimulator/App/VolSim.cpp +++ b/src/Mod/CAM/PathSimulator/App/VolSim.cpp @@ -748,7 +748,7 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res) for (int x = 0; x < radValue; x++) { // find the face of the tool by checking z points across the // radius to see if the point is inside the shape - pnt.x = x * res; + pnt.x = static_cast(x) * res; bool inside = isInside(toolShape, pnt, res); // move down until the point is outside the shape diff --git a/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp b/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp index 03f2f080c7..4c6aa63c1e 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/TextureLoader.cpp @@ -55,7 +55,8 @@ TextureLoader::TextureLoader(std::string imgFolder, int textureSize) : mImageFolder(imgFolder) { - int buffsize = textureSize * textureSize * sizeof(unsigned int); + size_t buffsize = + static_cast(textureSize) * static_cast(textureSize) * sizeof(unsigned int); mRawData = (unsigned int*)malloc(buffsize); if (mRawData == nullptr) { return;