diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-24 09:32:15 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-24 09:33:30 -0800 |
commit | 90e979d0d9a94601fc9a0c1e5ad785ede1e92381 (patch) | |
tree | a2e80a09c0e85f6d6d55362b5cc7dace1b9f427a /parser.cpp | |
parent | 8232857d0785b5b2db8884d11680de5c2fe9b857 (diff) |
Added some const correctness
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1054,9 +1054,9 @@ const wchar_t *parser_t::current_line() int lineno=1; const wchar_t *file; - wchar_t *whole_str; - wchar_t *line; - wchar_t *line_end; + const wchar_t *whole_str; + const wchar_t *line; + const wchar_t *line_end; int i; int offset; int current_line_width; @@ -1158,7 +1158,7 @@ const wchar_t *parser_t::current_line() } } - free( line ); + free( (void *)line ); parser_t::stack_trace( current_block, lineinfo ); return lineinfo.c_str(); @@ -1653,7 +1653,7 @@ int parser_t::parse_job( process_t *p, case TOK_PIPE: { - wchar_t *str = tok_string( tok ); + const wchar_t *str = tok_string( tok ); if( tok_get_pos(tok)>0 && str[tok_get_pos(tok)-1] == L'|' ) { error( SYNTAX_ERROR, @@ -2333,7 +2333,7 @@ void parser_t::eval_job( tokenizer *tok ) case TOK_BACKGROUND: { - wchar_t *str = tok_string( tok ); + const wchar_t *str = tok_string( tok ); if( tok_get_pos(tok)>0 && str[tok_get_pos(tok)-1] == L'&' ) { error( SYNTAX_ERROR, |