]> git.lyx.org Git - lyx.git/blobdiff - src/ModuleList.cpp
fix warning
[lyx.git] / src / ModuleList.cpp
index 14e2917159bddeeea7fb184ad714221ed823c6a5..e53af9b7e9f98d12dc315eefdcc17571cdbb5641 100644 (file)
@@ -22,7 +22,6 @@
 #include "support/lstrings.h"
 
 #include <algorithm>
-#include <ostream>
        
 using namespace std;
 using namespace lyx::support;
@@ -83,27 +82,23 @@ bool ModuleList::load()
        LYXERR(Debug::TCLASS, "Reading modules from `" << real_file << '\'');
 
        if (real_file.empty()) {
-               lyxerr << "ModuleList::load(): unable to find "
-                               "modules file  `"
-                               << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
-                               << "'.\nNo modules will be available." << endl;
+               LYXERR0("unable to find modules file  `"
+                       << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
+                       << "'.\nNo modules will be available.");
                return false;
        }
 
-       Lexer lex(0, 0);
+       Lexer lex;
        if (!lex.setFile(real_file)) {
-               lyxerr << "ModuleList::load():"
-                               "lyxlex was not able to set file: "
-                               << real_file << ".\nNo modules will be available." << endl;
+               LYXERR0("lyxlex was not able to set file: "
+                       << real_file << ".\nNo modules will be available.");
                return false;
        }
 
        if (!lex.isOK()) {
-               lyxerr << "ModuleList::load():" <<
-                               "unable to open modules file  `"
-                               << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
-                               << "'\nNo modules will be available."
-                               << endl;
+               LYXERR0("unable to open modules file  `"
+                       << to_utf8(makeDisplayPath(real_file.absFilename(), 1000))
+                       << "'\nNo modules will be available.");
                return false;
        }