mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -439,13 +439,14 @@ Handle(AIS_Shape) GetAISShapeFromName(const char* name)
|
||||
const Handle(AIS_InteractiveObject) IO =
|
||||
Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (!IO.IsNull()) {
|
||||
if(IO->Type()==AIS_KOI_Shape)
|
||||
if(IO->Type()==AIS_KOI_Shape) {
|
||||
if(IO->Signature()==0){
|
||||
retsh = *((Handle(AIS_Shape)*)&IO);
|
||||
}
|
||||
else
|
||||
cout << "an Object which is not an AIS_Shape "
|
||||
"already has this name!!!"<<endl;
|
||||
}
|
||||
}
|
||||
return retsh;
|
||||
}
|
||||
@@ -1009,12 +1010,12 @@ static int VSubInt(Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
TCollection_AsciiString name = argv[2];
|
||||
if(GetMapOfAIS().IsBound2(name)){
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (!IO.IsNull())
|
||||
if (!IO.IsNull()) {
|
||||
if(On==1)
|
||||
Ctx->SubIntensityOn(IO);
|
||||
else
|
||||
Ctx->SubIntensityOff(IO);
|
||||
|
||||
}
|
||||
}
|
||||
else return 1;
|
||||
}
|
||||
@@ -1121,11 +1122,12 @@ static int VColor2 (Draw_Interpretor& di, Standard_Integer argc, const char** ar
|
||||
while ( it.More() ) {
|
||||
const Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetColor(ashape,ViewerTest::GetColorFromName(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetColor(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@@ -1218,11 +1220,12 @@ static int VTransparency (Draw_Interpretor& di, Standard_Integer argc,
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetTransparency(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@@ -1274,11 +1277,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
if ( ThereIsName && IsBound ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (GetMapOfAIS().Find2(name));
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[2]));
|
||||
else
|
||||
TheAISContext()->UnsetMaterial(ashape);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
// Il n'y a pas de nom de shape
|
||||
@@ -1308,11 +1312,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetMaterial(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@@ -1399,15 +1404,16 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
else if (!ThereIsCurrent && !ThereIsArgument){
|
||||
ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName
|
||||
it(GetMapOfAIS());
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
it.Next();
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
|
@@ -32,8 +32,8 @@
|
||||
ViewerTest_EventManager::ViewerTest_EventManager
|
||||
(const Handle(V3d_View)& aView,
|
||||
const Handle(AIS_InteractiveContext)& Ctx)
|
||||
: myView (aView),
|
||||
myCtx (Ctx),
|
||||
: myCtx (Ctx),
|
||||
myView (aView),
|
||||
myX (-1),
|
||||
myY (-1)
|
||||
{}
|
||||
|
@@ -3319,14 +3319,13 @@ private:
|
||||
|
||||
Standard_Real myX1;
|
||||
Standard_Real myY1;
|
||||
Standard_Real myHeight;
|
||||
TCollection_AsciiString myText;
|
||||
TCollection_AsciiString myFontName;
|
||||
Standard_Real myHeight;
|
||||
Handle(Visual3d_Layer) myLayer;
|
||||
Quantity_Color myColor;
|
||||
Quantity_Color mySubtitleColor;
|
||||
Aspect_TypeOfDisplayText myType;
|
||||
Handle(Visual3d_Layer) myLayer;
|
||||
|
||||
TCollection_AsciiString myFontName;
|
||||
};
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(V3d_TextItem, Visual3d_LayerItem)
|
||||
@@ -3391,10 +3390,10 @@ public:
|
||||
private:
|
||||
|
||||
Standard_Real myX1, myY1, myX2, myY2;
|
||||
V3d_LayerMgrPointer myLayerMgr;
|
||||
Aspect_TypeOfLine myType;
|
||||
Standard_Real myWidth;
|
||||
Standard_Real myTransparency;
|
||||
Aspect_TypeOfLine myType;
|
||||
V3d_LayerMgrPointer myLayerMgr;
|
||||
};
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(V3d_LineItem, Visual3d_LayerItem)
|
||||
|
Reference in New Issue
Block a user