]> git.lyx.org Git - lyx.git/blobdiff - src/PersonalWordList.cpp
Update Win installer for new dictionary links. Untested.
[lyx.git] / src / PersonalWordList.cpp
index a0a8726eb61f5fe26d18d60e8cc4770bc59684a9..ca61d8a17106f5577c9d66de2308eb52b4a7355e 100644 (file)
 #include "support/filetools.h"
 #include "support/Package.h"
 #include "support/FileName.h"
-#include "support/lstrings.h"
-#include "support/os.h"
 
 #include <string>
 #include <fstream>
 
 using namespace std;
 using namespace lyx::support;
-using namespace lyx::support::os;
 
 namespace lyx {
 
@@ -54,14 +51,14 @@ void PersonalWordList::load()
        LYXERR(Debug::FILES, "load personal dictionary from: " << fn);
        ifstream ifs(fn.toFilesystemEncoding().c_str());
 
-       dirty(words_.size() > 0);
+       dirty(!words_.empty());
        words_.clear();
        string line;
        getline(ifs, line);
        if (line == header()) {
                while (ifs) {
                        getline(ifs, line);
-                       if (!line.empty() && !line[0] == '#') {
+                       if (!line.empty() && !(line[0] == '#')) {
                                docstring const word = from_utf8(line);
                                insert(word);
                        }
@@ -92,6 +89,7 @@ void PersonalWordList::save()
        LYXERR(Debug::FILES, "count of saved items: " << words_.size());
 }
 
+
 bool PersonalWordList::equalwords(docstring const & w1, docstring const & w2) const
 {
        return w1 == w2;