mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024171: Eliminate CLang compiler warning -Wreorder
Got rid of -Wreorder warning (wrong fields' initialization order); some warnings -Wdangling-else are also fixed
This commit is contained in:
@@ -461,14 +461,16 @@ Standard_Boolean XCAFDoc_ColorTool::SetInstanceColor (const TopoDS_Shape& theSha
|
||||
return Standard_False;
|
||||
Handle(XCAFDoc_GraphNode) aSHUO;
|
||||
// set the SHUO structure for this component if it is not exist
|
||||
if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) )
|
||||
if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) ) {
|
||||
if (aLabels.Length() == 1) {
|
||||
// set color directly for component as NAUO
|
||||
SetColor(aLabels.Value(1), color, type);
|
||||
return Standard_True;
|
||||
}
|
||||
else if ( !IsCreateSHUO || !ShapeTool()->SetSHUO( aLabels, aSHUO ) )
|
||||
else if ( !IsCreateSHUO || !ShapeTool()->SetSHUO( aLabels, aSHUO ) ) {
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
TDF_Label aSHUOLabel = aSHUO->Label();
|
||||
SetColor( aSHUOLabel, color, type );
|
||||
return Standard_True;
|
||||
|
Reference in New Issue
Block a user