diff options
author | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
---|---|---|
committer | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
commit | a359f45df219e6a3845870ca69b4116083d787f7 (patch) | |
tree | 08454add430170b4113659caf084f9a8801f77c3 /function.cpp | |
parent | e8b6d48ad038089e37730990212676e50a8d2352 (diff) |
Redesign new environment variables to use env_var_t instead of wcstring
Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
Diffstat (limited to 'function.cpp')
-rw-r--r-- | function.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/function.cpp b/function.cpp index e8452fa6..d0ac36b7 100644 --- a/function.cpp +++ b/function.cpp @@ -152,11 +152,10 @@ static void autoload_names( std::set<wcstring> &names, int get_hidden ) { size_t i; - const wcstring path_var_wstr = env_get_string( L"fish_function_path" ); - const wchar_t *path_var = path_var_wstr.empty()?NULL:path_var_wstr.c_str(); - - if( ! path_var ) - return; + const env_var_t path_var_wstr = env_get_string( L"fish_function_path" ); + if (path_var_wstr.missing()) + return; + const wchar_t *path_var = path_var_wstr.c_str(); wcstring_list_t path_list; |