From: <den...@us...> - 2010-06-08 09:17:31
|
Revision: 192 http://stdair.svn.sourceforge.net/stdair/?rev=192&view=rev Author: denis_arnaud Date: 2010-06-08 09:17:25 +0000 (Tue, 08 Jun 2010) Log Message: ----------- [Dev] The insertion of an element in the map of children now returns an actual boolean value when the holder is a multimap. Modified Paths: -------------- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp Modified: trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp =================================================================== --- trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-06-08 09:07:39 UTC (rev 191) +++ trunk/stdair/stdair/bom/BomChildrenHolderImp.hpp 2010-06-08 09:17:25 UTC (rev 192) @@ -150,9 +150,11 @@ /** Internal insertion function into a multimap. */ const bool insert (const MapKey_T& iKey, const Structure_T& iStructure, std::multimap<const MapKey_T, const Structure_T*>& ioMap){ - ioMap.insert (typename std::multimap<const MapKey_T, const Structure_T*>:: - value_type (iKey, &iStructure)); - return true; + const bool hasInsertionBeenSuccessful = + (ioMap.insert (typename std::multimap<const MapKey_T, const Structure_T*>:: + value_type (iKey, &iStructure))) != (ioMap.end()); + + return hasInsertionBeenSuccessful; } private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |