Use std::map::find() instead of iterating ourselves.

This commit is contained in:
Richard Heck 2013-02-09 14:37:42 -05:00
parent 4a6d9957f7
commit a95ed3a2b9

View File

@ -1252,12 +1252,8 @@ bool TextClass::hasInsetLayout(docstring const & n) const
{
if (n.empty())
return false;
InsetLayouts::const_iterator it = insetlayoutlist_.begin();
InsetLayouts::const_iterator en = insetlayoutlist_.end();
for (; it != en; ++it)
if (n == it->first)
return true;
return false;
InsetLayouts::const_iterator it = insetlayoutlist_.find(n);
return it != insetlayoutlist_.end();
}