mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023787: Eliminate trivial type conversion warnings in MSVC
Explicit type cast added in conversions from double to float in PrsMgr, Select3D, StdPrs, Visual3d, and Voxel. Minor corrections in ShapeProcess and TCollection. In Visual3d_ViewManager::ConvertCoord...(), output is initialized by zeros instead of RealLast() in case of failure. In XmlMXCAFDoc, material density is correctly converted to string when writing to Xml.
This commit is contained in:
@@ -137,9 +137,9 @@ void StdPrs_ToolShadedShape::Normal(const TopoDS_Face& aFace,
|
||||
}
|
||||
|
||||
Standard_Integer j = (i - UVNodes.Lower()) * 3;
|
||||
Normals->SetValue(j + 1, Nor(i).X());
|
||||
Normals->SetValue(j + 2, Nor(i).Y());
|
||||
Normals->SetValue(j + 3, Nor(i).Z());
|
||||
Normals->SetValue(j + 1, (Standard_ShortReal)Nor(i).X());
|
||||
Normals->SetValue(j + 2, (Standard_ShortReal)Nor(i).Y());
|
||||
Normals->SetValue(j + 3, (Standard_ShortReal)Nor(i).Z());
|
||||
|
||||
if (aFace.Orientation() == TopAbs_REVERSED) (Nor(i)).Reverse();
|
||||
|
||||
@@ -179,9 +179,9 @@ void StdPrs_ToolShadedShape::Normal(const TopoDS_Face& aFace,
|
||||
Nor(i) = gp_Dir(eqPlan);
|
||||
|
||||
Standard_Integer j = (i - Nodes.Lower()) * 3;
|
||||
Normals->SetValue(j + 1, Nor(i).X());
|
||||
Normals->SetValue(j + 2, Nor(i).Y());
|
||||
Normals->SetValue(j + 3, Nor(i).Z());
|
||||
Normals->SetValue(j + 1, (Standard_ShortReal)Nor(i).X());
|
||||
Normals->SetValue(j + 2, (Standard_ShortReal)Nor(i).Y());
|
||||
Normals->SetValue(j + 3, (Standard_ShortReal)Nor(i).Z());
|
||||
|
||||
if (aFace.Orientation() == TopAbs_REVERSED) (Nor(i)).Reverse();
|
||||
|
||||
|
Reference in New Issue
Block a user