]> git.lyx.org Git - lyx.git/blobdiff - src/WordList.h
Fix functions that used functions but did not defined it
[lyx.git] / src / WordList.h
index d21f9c8c7ed6924316482ef3dfdd14dbbe389e71..9c2eaf1b8e7539ef250b20c887b9e2370ed54a89 100644 (file)
 #define WORDLIST_H
 
 #include "support/docstring.h"
+#include "support/mute_warning.h"
+
+#include <memory>
 
 namespace lyx {
 
 class WordList {
-       // noncopyable because of pimpl
-       WordList(WordList const &);
-       WordList & operator=(WordList const &);
 public:
        ///
        WordList();
-       ///
-       ~WordList();
-
        ///
        docstring const & word(size_t idx) const;
        ///
@@ -34,15 +31,15 @@ public:
        void insert(docstring const & w);
        ///
        void remove(docstring const & w);
-       ///
-       static void cleanupWordLists();
 
 private:
        struct Impl;
-       Impl * d;
+       std::unique_ptr<Impl> d;
 };
 
-WordList * theWordList(std::string const & lang);
+LYX_BEGIN_MUTE_GCC_WARNING(dangling-reference)
+WordList & theWordList(std::string const & lang);
+LYX_END_MUTE_GCC_WARNING
 
 } // namespace lyx