mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0029740
: Draw Harness - eliminate redundant casts to AIS_InteractiveObject
NCollecton_DoubleMap has been extended with two new methods Find1() and Find2() performing lookup and returning found key withoout throwing an exception (similar to NCollection_DataMap::Find()). ViewerTest_DoubleMapOfInteractiveAndName has been redeclared to define Handle(AIS_InteractiveObject) key instead of Handle(Standard_Transient).
This commit is contained in:
@@ -231,11 +231,10 @@ static int tinspector (Draw_Interpretor& di, Standard_Integer theArgsNb, const c
|
||||
anItemNamesToSelect.Append (TInspectorAPI_PluginParameters::ParametersToString (aShape));
|
||||
}
|
||||
// search prsentations with given name
|
||||
if (GetMapOfAIS().IsBound2 (theArgs[anIt]))
|
||||
Handle(AIS_InteractiveObject) anIO;
|
||||
GetMapOfAIS().Find2 (theArgs[anIt], anIO);
|
||||
if (!anIO.IsNull())
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast
|
||||
(GetMapOfAIS().Find2 (theArgs[anIt]));
|
||||
if (!anIO.IsNull())
|
||||
anObjectsToSelect.Append (anIO);
|
||||
}
|
||||
// give parameters as a container of names
|
||||
|
Reference in New Issue
Block a user