mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 04:03:39 +08:00
lint: remove unused function
This commit is contained in:
parent
25e0a39165
commit
a90b521eb4
10
src/path.cpp
10
src/path.cpp
|
@ -292,16 +292,6 @@ bool path_get_data(wcstring &path) {
|
|||
return !result.empty();
|
||||
}
|
||||
|
||||
__attribute__((unused)) static void replace_all(wcstring &str, const wchar_t *needle,
|
||||
const wchar_t *replacement) {
|
||||
size_t needle_len = wcslen(needle);
|
||||
size_t offset = 0;
|
||||
while ((offset = str.find(needle, offset)) != wcstring::npos) {
|
||||
str.replace(offset, needle_len, replacement);
|
||||
offset += needle_len;
|
||||
}
|
||||
}
|
||||
|
||||
void path_make_canonical(wcstring &path) {
|
||||
// Ignore trailing slashes, unless it's the first character.
|
||||
size_t len = path.size();
|
||||
|
|
Loading…
Reference in New Issue
Block a user