X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXAO%2FXAO_Group.cxx;h=00ea8ab67c80c0394a7d6bab252e2153fa64639c;hb=d7d68d8f96e0c97bd5d3132bd0f406fe00e8dc47;hp=c2799c55907823a8acd819d30a2f1a7a24dbc950;hpb=ec168c32f86cab8199030ec4e8e2b1cbd5e42670;p=modules%2Fgeom.git diff --git a/src/XAO/XAO_Group.cxx b/src/XAO/XAO_Group.cxx index c2799c559..00ea8ab67 100644 --- a/src/XAO/XAO_Group.cxx +++ b/src/XAO/XAO_Group.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013-2020 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); }