From ae2f97994728153c15f26243abe42052bd70ad6d Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 9 Jun 2010 21:02:47 +0000 Subject: [PATCH] More minor cleanup, while looking for... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34640 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 9faead6ef5..71c6c5b8fd 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -208,8 +208,9 @@ public: TextContainer text_; typedef set Words; + typedef map LangWordsMap; /// - map words_; + LangWordsMap words_; /// Layout const * layout_; }; @@ -3072,8 +3073,8 @@ bool Paragraph::isSeparator(pos_type pos) const void Paragraph::deregisterWords() { - map::const_iterator itl = d->words_.begin(); - map::const_iterator ite = d->words_.end(); + Private::LangWordsMap::const_iterator itl = d->words_.begin(); + Private::LangWordsMap::const_iterator ite = d->words_.end(); for (; itl != ite; ++itl) { WordList * wl = theWordList(itl->first); Private::Words::const_iterator it = (itl->second).begin(); @@ -3144,11 +3145,13 @@ void Paragraph::collectWords() void Paragraph::registerWords() { - map::const_iterator itl; - Private::Words::const_iterator it; - for (itl = d->words_.begin(); itl != d->words_.end(); ++itl) { + Private::LangWordsMap::const_iterator itl = d->words_.begin(); + Private::LangWordsMap::const_iterator ite = d->words_.end(); + for (; itl != ite; ++itl) { WordList * wl = theWordList(itl->first); - for (it = (itl->second).begin(); it != (itl->second).end(); ++it) + Private::Words::const_iterator it = (itl->second).begin(); + Private::Words::const_iterator et = (itl->second).end(); + for (; it != et; ++it) wl->insert(*it); } }