]> git.lyx.org Git - features.git/blobdiff - src/TextClass.cpp
Use std::map::find() instead of iterating ourselves.
[features.git] / src / TextClass.cpp
index 742eae3e0604d905eb16346deb7db0db16553ddd..3609deec2cf393bbffdbcfff5aab2f288b498c60 100644 (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();
 }