Salome HOME
Copyright update 2022
[modules/geom.git] / src / XAO / XAO_Group.cxx
index 9927d22a2df1a328928b717b8aa28dec6e242610..919f06b997b9050db1072f77235e1870547ea15b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2022  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
@@ -24,8 +24,7 @@
 using namespace XAO;
 
 
-Group::Group(const XAO::Dimension& dim, const int& nbElements, const std::string& name)
-throw (XAO_Exception)
+Group::Group(XAO::Dimension dim, int nbElements, const std::string& name)
 {
     if (dim == XAO::WHOLE)
         throw XAO_Exception("Dimension WHOLE is not valid for group.");
@@ -40,22 +39,21 @@ Group::~Group()
 {
 }
 
-void Group::checkIndex(const int& element)
-throw (XAO_Exception)
+void Group::checkIndex(int element)
 {
-    if (element < m_elements.size() && element >= 0)
+  if (element < (int)m_elements.size() && element >= 0)
         return;
 
     throw XAO_Exception(MsgBuilder() << "Index of element is out of range [0, "
                                      << m_elements.size()-1 << "]: " << element);
 }
 
-void Group::add(const int& value)
+void Group::add(int value)
 {
     m_elements.insert(value);
 }
 
-void Group::remove(const int& value)
+void Group::remove(int value)
 {
     m_elements.erase(value);
 }