Salome HOME
Update copyright information
[modules/smesh.git] / src / SMESHFiltersSelection / SMESH_LogicalFilter.cxx
index 1495c9636915ca6db4cbc318b625370d64e97bf6..f8f908f833ba3afd7130ba3b16d86e617b414455 100644 (file)
@@ -1,25 +1,27 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : SMESH_LogicalFilter.cxx
 //  Module : SMESH
-
+//
 #include "SMESH_LogicalFilter.hxx"
 
 //=======================================================================
@@ -27,7 +29,7 @@
 // Purpose : Constructor
 //=======================================================================
 SMESH_LogicalFilter::SMESH_LogicalFilter (const QList<SUIT_SelectionFilter*>& theFilters,
-                                          const int                             theLogOp)
+                                          const int                           theLogOp)
 {
   setFilters(theFilters);
   setOperation(theLogOp);
@@ -47,10 +49,9 @@ SMESH_LogicalFilter::~SMESH_LogicalFilter()
 //=======================================================================
 bool SMESH_LogicalFilter::isOk (const SUIT_DataOwner* owner) const
 {
-  bool res = true;
-  for ( QList<SUIT_SelectionFilter*>::const_iterator it = myFilters.begin(); it != myFilters.end() && res; ++it )
+  SUIT_SelectionFilter* filter;
+  foreach( filter, myFilters )
   {
-    SUIT_SelectionFilter* filter = *it;
     if (myOperation == LO_OR && filter->isOk(owner))
       return true;
     if (myOperation == LO_AND && !filter->isOk(owner))