mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
Use std::map::find() instead of iterating ourselves.
This commit is contained in:
parent
4a6d9957f7
commit
a95ed3a2b9
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user