mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix some dead code
Delete some dead code, and migrate some other code under the appropriate preprocessor check.
This commit is contained in:
parent
a17a815c87
commit
9fd3f35c9a
2 changed files with 10 additions and 11 deletions
|
@ -101,16 +101,6 @@ static maybe_t<wcstring> default_vars_path() {
|
|||
return none();
|
||||
}
|
||||
|
||||
/// Returns a "variables" file in the appropriate runtime directory. This is called infrequently and
|
||||
/// so does not need to be cached.
|
||||
static wcstring default_named_pipe_path() {
|
||||
wcstring result = env_get_runtime_path();
|
||||
if (!result.empty()) {
|
||||
result.append(L"/fish_universal_variables");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Test if the message msg contains the command cmd.
|
||||
static bool match(const wchar_t *msg, const wchar_t *cmd) {
|
||||
size_t len = wcslen(cmd);
|
||||
|
@ -1366,6 +1356,16 @@ bool universal_notifier_t::notification_fd_became_readable(int fd) {
|
|||
}
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__CYGWIN__)
|
||||
/// Returns a "variables" file in the appropriate runtime directory. This is called infrequently and
|
||||
/// so does not need to be cached.
|
||||
static wcstring default_named_pipe_path() {
|
||||
wcstring result = env_get_runtime_path();
|
||||
if (!result.empty()) {
|
||||
result.append(L"/fish_universal_variables");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void universal_notifier_named_pipe_t::make_pipe(const wchar_t *test_path) {
|
||||
wcstring vars_path = test_path ? wcstring(test_path) : default_named_pipe_path();
|
||||
vars_path.append(L".notifier");
|
||||
|
|
|
@ -207,7 +207,6 @@ bool parse_execution_context_t::job_is_simple_block(tnode_t<g::job> job_node) co
|
|||
// Check if we're a block statement with redirections. We do it this obnoxious way to preserve
|
||||
// type safety (in case we add more specific statement types).
|
||||
const parse_node_t &specific_statement = statement.get_child_node<0>();
|
||||
tnode_t<g::arguments_or_redirections_list> args_and_redirs;
|
||||
switch (specific_statement.type) {
|
||||
case symbol_block_statement:
|
||||
return is_empty(statement.require_get_child<g::block_statement, 0>().child<3>());
|
||||
|
|
Loading…
Reference in a new issue