diff options
author | 2013-02-16 00:02:40 -0800 | |
---|---|---|
committer | 2013-02-16 00:02:40 -0800 | |
commit | 6d522e6ed6b2e87b193e928e888ca4747a4f974d (patch) | |
tree | e052a6ee43d9111d08373e12bcc7515cc4030266 /complete.cpp | |
parent | 635c87d6298d7c30651e266105ef72f3e1876209 (diff) |
First round of fixes based on cppcheck
Diffstat (limited to 'complete.cpp')
-rw-r--r-- | complete.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/complete.cpp b/complete.cpp index 669fd574..60abfc67 100644 --- a/complete.cpp +++ b/complete.cpp @@ -860,7 +860,7 @@ int complete_is_valid_option(const wcstring &str, if (errors) { const wcstring str = opt.substr(j, 1); - errors->push_back(format_error(_(L"Unknown option: "), str.c_str())); + errors->push_back(format_error(_(L"Unknown option: "), str)); } opt_found = 0; @@ -1375,7 +1375,7 @@ bool completer_t::complete_param(const wcstring &scmd_orig, const wcstring &spop /* Now release the lock and test each option that we captured above. We have to do this outside the lock because callouts (like the condition) may add or remove completions. See https://github.com/ridiculousfish/fishfish/issues/2 */ - for (std::vector<local_options_t>::const_iterator iter = all_options.begin(); iter != all_options.end(); iter++) + for (std::vector<local_options_t>::const_iterator iter = all_options.begin(); iter != all_options.end(); ++iter) { const option_list_t &options = iter->options; use_common=1; |