]> git.lyx.org Git - features.git/commitdiff
Use a central typedef for vectors of WordLangTuple.
authorStephan Witt <switt@lyx.org>
Fri, 16 Jul 2021 14:39:05 +0000 (16:39 +0200)
committerStephan Witt <switt@lyx.org>
Fri, 16 Jul 2021 14:39:05 +0000 (16:39 +0200)
src/BufferParams.cpp
src/BufferParams.h
src/HunspellChecker.cpp
src/WordLangTuple.h

index ec4cc0d60aed42f5ca4c94d4ea8d8bc3f1c2042c..d9fb39e3b67e2615772bb419e1201631552b16d8 100644 (file)
@@ -341,7 +341,7 @@ public:
 
        AuthorList authorlist;
        BranchList branchlist;
-       IgnoreList spellignore;
+       WordLangTable spellignore;
        Bullet temp_bullets[4];
        Bullet user_defined_bullets[4];
        IndicesList indiceslist;
@@ -602,16 +602,13 @@ IndicesList const & BufferParams::indiceslist() const
 }
 
 
-typedef std::vector<WordLangTuple> IgnoreList;
-
-
-IgnoreList & BufferParams::spellignore()
+WordLangTable & BufferParams::spellignore()
 {
        return pimpl_->spellignore;
 }
 
 
-IgnoreList const & BufferParams::spellignore() const
+WordLangTable const & BufferParams::spellignore() const
 {
        return pimpl_->spellignore;
 }
index 2c74f7098d55cf91c76ab1e1c5ae43814183a2bc..a1dfaa9b7238d3ed70b2d0a023bf4767d0487e3d 100644 (file)
@@ -337,10 +337,8 @@ public:
        IndicesList & indiceslist();
        IndicesList const & indiceslist() const;
        ///
-       typedef std::vector<WordLangTuple> IgnoreList;
-       ///
-       IgnoreList & spellignore();
-       IgnoreList const & spellignore() const;
+       WordLangTable & spellignore();
+       WordLangTable const & spellignore() const;
        bool spellignored(WordLangTuple const & wl) const;
        /**
         * The LyX name of the input encoding for LaTeX. This can be one of
index 1cac9ad09732811d37eb0a9fbf0fe8e79780b3b5..01ec19498b70e28075db5e5b8a9c6bb8c4c77e49 100644 (file)
@@ -41,8 +41,6 @@ namespace {
 typedef map<std::string, Hunspell *> Spellers;
 typedef map<std::string, PersonalWordList *> LangPersonalWordList;
 
-typedef vector<WordLangTuple> IgnoreList;
-
 docstring remap_result(docstring const & s)
 {
        // substitute RIGHT SINGLE QUOTATION MARK
@@ -78,7 +76,7 @@ struct HunspellChecker::Private
        /// the spellers
        Spellers spellers_;
        ///
-       IgnoreList ignored_;
+       WordLangTable ignored_;
        ///
        LangPersonalWordList personal_;
        ///
@@ -283,7 +281,7 @@ int HunspellChecker::Private::numDictionaries() const
 
 bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const
 {
-       IgnoreList::const_iterator it = ignored_.begin();
+       WordLangTable::const_iterator it = ignored_.begin();
        for (; it != ignored_.end(); ++it) {
                if (it->lang()->code() != wl.lang()->code())
                        continue;
@@ -350,7 +348,7 @@ SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl,
        if (d->isIgnored(wl))
                return WORD_OK;
 
-       IgnoreList::const_iterator it = docdict.begin();
+       WordLangTable::const_iterator it = docdict.begin();
        for (; it != docdict.end(); ++it) {
                if (it->lang()->code() != wl.lang()->code())
                        continue;
index baf93385788f46486f57d2b4e617ee94bd6df407..6459c46f8faa18eaba2d3540863d9fa5235fbd16 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "support/docstring.h"
 
+#include <vector>
+
 
 namespace lyx {
 
@@ -51,6 +53,9 @@ private:
 };
 
 
+typedef std::vector<WordLangTuple> WordLangTable;
+
+
 } // namespace lyx
 
 #endif // WORD_LANG_TUPLE_H