[clang-tidy] Remove const from strings

Found with readability-const-return-type
This commit is contained in:
Rosen Penev 2019-12-21 12:45:44 -08:00
parent 668f73c0d6
commit f2e7def667
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
4 changed files with 4 additions and 5 deletions

View File

@ -205,8 +205,7 @@ bool is_windows_subsystem_for_linux() {
#ifdef HAVE_BACKTRACE_SYMBOLS
// This function produces a stack backtrace with demangled function & method names. It is based on
// https://gist.github.com/fmela/591333 but adapted to the style of the fish project.
[[gnu::noinline]] static const wcstring_list_t demangled_backtrace(int max_frames,
int skip_levels) {
[[gnu::noinline]] static wcstring_list_t demangled_backtrace(int max_frames, int skip_levels) {
void *callstack[128];
const int n_max_frames = sizeof(callstack) / sizeof(callstack[0]);
int n_frames = backtrace(callstack, n_max_frames);

View File

@ -104,7 +104,7 @@ typedef struct complete_entry_opt {
// Completion flags.
complete_flags_t flags;
const wcstring localized_desc() const { return C_(desc); }
wcstring localized_desc() const { return C_(desc); }
size_t expected_dash_count() const {
switch (this->type) {

View File

@ -130,7 +130,7 @@ bool wreaddir_for_dirs(DIR *dir, wcstring *out_name) {
return result != nullptr;
}
const wcstring wgetcwd() {
wcstring wgetcwd() {
char cwd[PATH_MAX];
char *res = getcwd(cwd, sizeof(cwd));
if (res) {

View File

@ -71,7 +71,7 @@ void safe_perror(const char *message);
const char *safe_strerror(int err);
/// Wide character version of getcwd().
const wcstring wgetcwd();
wcstring wgetcwd();
/// Wide character version of realpath function.
/// \returns the canonicalized path, or none if the path is invalid.