]> git.lyx.org Git - lyx.git/blobdiff - src/Lexer.cpp
adjust
[lyx.git] / src / Lexer.cpp
index f9146a296bb5f2999f1f2933976bd6185132e300..ce8de705470bde04ad3f5d76e8710ea8dac34b10 100644 (file)
@@ -25,7 +25,7 @@
 #include "support/types.h"
 #include "support/unicode.h"
 
-#include <boost/utility.hpp>
+#include <boost/noncopyable.hpp>
 
 #include <functional>
 #include <istream>
@@ -274,9 +274,10 @@ bool Lexer::Pimpl::setFile(FileName const & filename)
                // The check only outputs a debug message, because it triggers
                // a bug in compaq cxx 6.2, where is_open() returns 'true' for
                // a fresh new filebuf.  (JMarc)
-               if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
+               if (fb_.is_open() || istream::off_type(is.tellg()) > 0) {
                        LYXERR(Debug::LYXLEX) << "Error in Lexer::setFile: "
                                "file or stream already set." << endl;
+               }
                fb_.open(filename.toFilesystemEncoding().c_str(), ios::in);
                is.rdbuf(&fb_);
                name = filename.absFilename();
@@ -288,9 +289,10 @@ bool Lexer::Pimpl::setFile(FileName const & filename)
 
 void Lexer::Pimpl::setStream(istream & i)
 {
-       if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
+       if (fb_.is_open() || istream::off_type(is.tellg()) > 0) {
                LYXERR(Debug::LYXLEX)  << "Error in Lexer::setStream: "
                        "file or stream already set." << endl;
+       }
        is.rdbuf(i.rdbuf());
        lineno = 0;
 }