mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027900: Coding rules - drop redundant Name parameter from V3d_Viewer constructor
Removed unused methods AIS_InteractiveContext::DomainOfMainViewer(), V3d_Viewer::NextName(), V3d_Viewer::Domain(). NCollection_List - added methods Contains() and Remove() taking item value. V3d_Viewer now uses V3d_ListOfLight, V3d_ListOfView instead of V3d_ListOfTransient. Removed obsolete ZFit workaround from command XShow.
This commit is contained in:
@@ -199,6 +199,20 @@ public:
|
||||
PRemove (theIter, ListNode::delNode);
|
||||
}
|
||||
|
||||
//! Remove the first occurrence of the object.
|
||||
Standard_Boolean Remove (const TheItemType& theObject)
|
||||
{
|
||||
for (Iterator anIter (*this); anIter.More(); anIter.Next())
|
||||
{
|
||||
if (anIter.Value() == theObject)
|
||||
{
|
||||
Remove (anIter);
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//! InsertBefore
|
||||
TheItemType& InsertBefore (const TheItemType& theItem,
|
||||
Iterator& theIter)
|
||||
@@ -270,6 +284,19 @@ public:
|
||||
void Reverse ()
|
||||
{ PReverse(); }
|
||||
|
||||
//! Return true if object is stored in the list.
|
||||
Standard_Boolean Contains (const TheItemType& theObject) const
|
||||
{
|
||||
for (Iterator anIter (*this); anIter.More(); anIter.Next())
|
||||
{
|
||||
if (anIter.Value() == theObject)
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//! Destructor - clears the List
|
||||
virtual ~NCollection_List (void)
|
||||
{ Clear(); }
|
||||
|
Reference in New Issue
Block a user