]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Parser.cpp
Remove 3rdparty/boost/Makefile.am
[lyx.git] / src / tex2lyx / Parser.cpp
index cc8dd5aa58c77e7513603c895becf308b3eaa7de..67e0323c961463a2ca76f6e313ede1a1c9b1c51d 100644 (file)
@@ -10,8 +10,9 @@
 
 #include <config.h>
 
-#include "Encoding.h"
 #include "Parser.h"
+
+#include "Encoding.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
@@ -129,7 +130,7 @@ void iparserdocstream::putback(char_type c)
 }
 
 
-void iparserdocstream::putback(docstring s)
+void iparserdocstream::putback(docstring const & s)
 {
        s_ = s + s_;
 }
@@ -154,7 +155,7 @@ iparserdocstream & iparserdocstream::get(char_type &c)
 
 
 Parser::Parser(idocstream & is, std::string const & fixedenc)
-       : lineno_(0), pos_(0), iss_(0), is_(is),
+       : lineno_(0), pos_(0), iss_(nullptr), is_(is),
          encoding_iconv_(fixedenc.empty() ? "UTF-8" : fixedenc),
          theCatcodesType_(NORMAL_CATCODES), curr_cat_(UNDECIDED_CATCODES),
          fixed_enc_(!fixedenc.empty())
@@ -196,7 +197,7 @@ void Parser::deparse()
 }
 
 
-bool Parser::setEncoding(std::string const & e, int const & p)
+bool Parser::setEncoding(std::string const & e, int p)
 {
        // We may (and need to) use unsafe encodings here: Since the text is
        // converted to unicode while reading from is_, we never see text in
@@ -443,7 +444,7 @@ void Parser::dropPosition()
 }
 
 
-bool Parser::good()
+bool Parser::good() const
 {
        if (pos_ < tokens_.size())
                return true;
@@ -876,7 +877,7 @@ void Parser::dump() const
 }
 
 
-void Parser::error(string const & msg)
+void Parser::error(string const & msg) const
 {
        cerr << "Line ~" << lineno_ << ":  parse error: " << msg << endl;
        dump();