diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-11-21 17:48:35 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-11-21 17:48:35 -0800 |
commit | f545fb2491d36e02dc6c4005ada86be8678bba78 (patch) | |
tree | 3237ef337b1723b24dc32618cc5e03360e30e13e /history.cpp | |
parent | e73be48d9622d06039926fd2ba4a4b68b675f34a (diff) |
Work towards refactoring tokenizer to be a real object
Diffstat (limited to 'history.cpp')
-rw-r--r-- | history.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/history.cpp b/history.cpp index dd12eb95..0a87e8b9 100644 --- a/history.cpp +++ b/history.cpp @@ -1415,10 +1415,8 @@ void history_t::add_with_file_detection(const wcstring &str) ASSERT_IS_MAIN_THREAD(); path_list_t potential_paths; - tokenizer tokenizer; - for (tok_init(&tokenizer, str.c_str(), TOK_SQUASH_ERRORS); - tok_has_next(&tokenizer); - tok_next(&tokenizer)) + tokenizer_t tokenizer(str.c_str(), TOK_SQUASH_ERRORS); + for (; tok_has_next(&tokenizer); tok_next(&tokenizer)) { int type = tok_last_type(&tokenizer); if (type == TOK_STRING) |