error checking for find operation on map

release/4.3a0
Manohar Paluri 2009-08-28 14:33:19 +00:00
parent 630bc9144f
commit b530c97b08
1 changed files with 2 additions and 0 deletions

View File

@ -56,11 +56,13 @@ public:
inline ConditionalGaussian::shared_ptr get (const std::string& key) const
{
const_iterator cg = nodes.find(key); // get node
assert( cg != nodes.end() );
return cg->second;
}
inline ConditionalGaussian::shared_ptr operator[](const std::string& key) const
{
const_iterator cg = nodes.find(key); // get node
assert( cg != nodes.end() );
return cg->second;
}