From 521e9a5415c11e4d37ad4b2100166470f03eeacf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 18 Mar 2014 00:18:44 +0100 Subject: lex: add std namespace to a few function calls --- mmss/lex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mmss/lex.cpp b/mmss/lex.cpp index 3eb6e24..0b8e28b 100644 --- a/mmss/lex.cpp +++ b/mmss/lex.cpp @@ -123,7 +123,7 @@ int lex_t::io_error(YYSTYPE *yylval) { } int lex_t::syntax_error(YYSTYPE *yylval) { - if (ferror(file)) + if (std::ferror(file)) return io_error(yylval); yylval->error = "syntax error"; @@ -143,7 +143,7 @@ int lex_t::consume_comment(YYSTYPE *yylval, YYLTYPE *yylloc) { prev = current(); } - if (ferror(file)) + if (std::ferror(file)) return io_error(yylval); yylval->error = "unterminated block comment"; @@ -170,7 +170,7 @@ int lex_t::parse_string(YYSTYPE *yylval, YYLTYPE *yylloc) { while (true) { if (!next(yylloc, true)) { - free(buf); + std::free(buf); return unterminated_string(yylval); } @@ -250,7 +250,7 @@ int lex_t::parse_float(YYSTYPE *yylval, YYLTYPE *yylloc) { yylval->fnum = std::strtof(token, &endptr); bool ok = !*endptr; - free(token); + std::free(token); if (!ok) return syntax_error(yylval); -- cgit v1.2.3