From a95ed3a2b9697aaaba8e06610a152360711f18c6 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 9 Feb 2013 14:37:42 -0500 Subject: [PATCH] Use std::map::find() instead of iterating ourselves. --- src/TextClass.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 742eae3e06..3609deec2c 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -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(); }