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 /tokenizer.cpp | |
parent | 8232857d0785b5b2db8884d11680de5c2fe9b857 (diff) |
Added some const correctness
Diffstat (limited to 'tokenizer.cpp')
-rw-r--r-- | tokenizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tokenizer.cpp b/tokenizer.cpp index 7ea5491f..f02f47e0 100644 --- a/tokenizer.cpp +++ b/tokenizer.cpp @@ -144,7 +144,7 @@ void tok_init( tokenizer *tok, const wchar_t *b, int flags ) tok->has_next=1; tok->has_next = (*b != L'\0'); - tok->orig_buff = tok->buff = (wchar_t *)(b); + tok->orig_buff = tok->buff = b; tok_next( tok ); } @@ -154,7 +154,7 @@ void tok_destroy( tokenizer *tok ) free( tok->last ); if( tok->free_orig ) - free( tok->orig_buff ); + free( (void *)tok->orig_buff ); } int tok_last_type( tokenizer *tok ) @@ -624,7 +624,7 @@ void tok_next( tokenizer *tok ) { if( iswdigit( *tok->buff ) ) { - wchar_t *orig = tok->buff; + const wchar_t *orig = tok->buff; int fd = 0; while( iswdigit( *tok->buff ) ) fd = (fd*10) + (*(tok->buff++) - L'0'); @@ -646,7 +646,7 @@ void tok_next( tokenizer *tok ) } -wchar_t *tok_string( tokenizer *tok ) +const wchar_t *tok_string( tokenizer *tok ) { return tok?tok->orig_buff:0; } |