mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-10 04:17:44 +08:00
0024252: GCC warnings on breakage of strict-aliasing rules
Fixed type casts in NCollection maps Avoid invalid type cast in handling of LDOM text object Use correct pointer type in callback function of Graphic3d_CGraduatedTrihedron class Format of printf() simplified in IntPatch_Point.cxx
This commit is contained in:
@@ -3021,22 +3021,20 @@ void Visual3d_View::TriedronEcho (const Aspect_TypeOfTriedronEcho AType ) {
|
||||
|
||||
}
|
||||
|
||||
Standard_Boolean checkFloat(const Standard_Real value)
|
||||
static Standard_Boolean checkFloat(const Standard_Real value)
|
||||
{
|
||||
return value > -FLT_MAX && value < FLT_MAX;
|
||||
}
|
||||
|
||||
void SetMinMaxValuesCallback(void* Visual3dView)
|
||||
static void SetMinMaxValuesCallback(Visual3d_View* theView)
|
||||
{
|
||||
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
|
||||
|
||||
Handle(Visual3d_View) view = (Handle(Visual3d_View)&) Visual3dView;
|
||||
view->MinMaxValues(xmin, ymin, zmin, xmax, ymax, zmax);
|
||||
theView->MinMaxValues(xmin, ymin, zmin, xmax, ymax, zmax);
|
||||
|
||||
if (checkFloat(xmin) && checkFloat(ymin) && checkFloat(zmin) &&
|
||||
checkFloat(xmax) && checkFloat(ymax) && checkFloat(zmax))
|
||||
{
|
||||
Handle(Graphic3d_GraphicDriver) driver = Handle(Graphic3d_GraphicDriver)::DownCast(view->GraphicDriver());
|
||||
Handle(Graphic3d_GraphicDriver) driver = Handle(Graphic3d_GraphicDriver)::DownCast(theView->GraphicDriver());
|
||||
driver->GraduatedTrihedronMinMaxValues((Standard_ShortReal)xmin, (Standard_ShortReal)ymin, (Standard_ShortReal)zmin,
|
||||
(Standard_ShortReal)xmax, (Standard_ShortReal)ymax, (Standard_ShortReal)zmax);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user