summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/lex.cpp4
-rw-r--r--src/parse/lex.hpp4
-rw-r--r--src/parse/token.hpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp
index dfa8b489..fd6044f4 100644
--- a/src/parse/lex.cpp
+++ b/src/parse/lex.cpp
@@ -22,8 +22,8 @@
const bool DEBUG_PRINT_TOKENS = false;
-Lexer::Lexer(::std::string filename):
- m_path(filename),
+Lexer::Lexer(const ::std::string& filename):
+ m_path(filename.c_str()),
m_line(1),
m_line_ofs(0),
m_istream(filename.c_str()),
diff --git a/src/parse/lex.hpp b/src/parse/lex.hpp
index ccd0ab8a..a626a374 100644
--- a/src/parse/lex.hpp
+++ b/src/parse/lex.hpp
@@ -107,7 +107,7 @@ extern ::std::string& operator+=(::std::string& s, const Codepoint& cp);
class Lexer:
public TokenStream
{
- ::std::string m_path;
+ RcString m_path;
unsigned int m_line;
unsigned int m_line_ofs;
@@ -116,7 +116,7 @@ class Lexer:
char m_last_char;
Token m_next_token; // Used when lexing generated two tokens
public:
- Lexer(::std::string filename);
+ Lexer(const ::std::string& filename);
virtual Position getPosition() const override;
virtual Token realGetToken() override;
diff --git a/src/parse/token.hpp b/src/parse/token.hpp
index e2e1f16f..0a72cec1 100644
--- a/src/parse/token.hpp
+++ b/src/parse/token.hpp
@@ -26,7 +26,7 @@ public:
line(0),
ofs(0)
{}
- Position(::std::string filename, unsigned int line, unsigned int ofs):
+ Position(RcString filename, unsigned int line, unsigned int ofs):
filename(filename),
line(line),
ofs(ofs)