mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-25 02:01:15 -03:00
Switch from std::map<> to std::unordered_map<> where possible
Didn't switch env_var_t map because it seems to be mostly iterated in order, but that decision may be revisited at a later date.
This commit is contained in:
@@ -27,9 +27,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory> // IWYU pragma: keep
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -1566,7 +1566,7 @@ bool fish_xdm_login_hack_hack_hack_hack(std::vector<std::string> *cmds, int argc
|
||||
return result;
|
||||
}
|
||||
|
||||
std::map<const wcstring, const wcstring> abbreviations;
|
||||
std::unordered_map<const wcstring, const wcstring> abbreviations;
|
||||
void update_abbr_cache(const wchar_t *op, const wcstring &varname) {
|
||||
wcstring abbr;
|
||||
if (!unescape_string(varname.substr(wcslen(L"_fish_abbr_")), &abbr, 0, STRING_STYLE_VAR)) {
|
||||
|
||||
Reference in New Issue
Block a user