mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-10 21:11:15 -03:00
remove some wcstring -> wchar_t* -> wcstring conversions
Mostly related to usage _(L"foo"), keeping in mind the _ macro does a wcstring().c_str() already. And a smattering of other trivial micro-optimizations certain to not help tangibly.
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
#include "tokenizer.h"
|
||||
#include "wutil.h" // IWYU pragma: keep
|
||||
|
||||
wcstring tokenizer_get_error_message(tokenizer_error_t err) {
|
||||
// _(s) is already wgettext(s).c_str(), so let's not convert back to wcstring
|
||||
const wchar_t * tokenizer_get_error_message(tokenizer_error_t err) {
|
||||
switch (err) {
|
||||
case tokenizer_error_t::none:
|
||||
return L"";
|
||||
@@ -47,7 +48,7 @@ wcstring tokenizer_get_error_message(tokenizer_error_t err) {
|
||||
return _(L"Unexpected ')' found, expecting '}'");
|
||||
}
|
||||
assert(0 && "Unexpected tokenizer error");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Whether carets redirect stderr.
|
||||
|
||||
Reference in New Issue
Block a user