Salome HOME
Fix missing returns.
[modules/yacs.git] / src / engine / Pool.cxx
index 08ca194c624c3fef071c5d3da8db1a1064e1ef0d..53d1465acbee2061d67a8659fab39931b9e9bfb5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -107,8 +107,7 @@ Any *Pool::getOutSample(int id)
   for(iter=_container.begin();iter!=_container.end();iter++)
     if((*iter).first==id)
         return (*iter).second.outValue();
-  if(iter==_container.end())
-    throw YACS::Exception("no current case set in pool");
+  throw YACS::Exception("no current case set in pool");
 }
 
 
@@ -137,7 +136,7 @@ void Pool::destroyCurrentCase()
  * corrupted 'this'.
  *
  */
-void Pool::checkConsistency() throw(YACS::Exception)
+void Pool::checkConsistency()
 {
   // First check unicity of ids.
   std::set<int> ids;
@@ -157,7 +156,7 @@ void Pool::checkConsistency() throw(YACS::Exception)
 /*!
  * \throw See the \b throw case of pushOutSampleAt method.
  */
-void Pool::setCurrentId(int id) throw(YACS::Exception)
+void Pool::setCurrentId(int id)
 {
   std::list< std::pair<int, ExpData> >::iterator iter;
   for(iter=_container.begin();iter!=_container.end();iter++)
@@ -178,7 +177,7 @@ void Pool::setCurrentId(int id) throw(YACS::Exception)
  *        has destroyed a case id different from its id.
  *
  */
-void Pool::putOutSampleAt(int id, Any *outValue) throw(YACS::Exception)
+void Pool::putOutSampleAt(int id, Any *outValue)
 {
   std::list< std::pair<int, ExpData> >::iterator iter;
   for(iter=_container.begin();iter!=_container.end();iter++)