The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit a95ed3a2b9697aaaba8e06610a152360711f18c6
Author: Richard Heck <[email protected]>
Date:   Sat Feb 9 14:37:42 2013 -0500

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

diff --git a/src/TextClass.cpp b/src/TextClass.cpp
index 742eae3..3609dee 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();
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/TextClass.cpp |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to