mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 09:07:19 +03:00
Do not copy environment strings, just refer to them
This commit is contained in:
parent
31d67f51dd
commit
ef0c183ed7
@ -16,7 +16,8 @@ EnvVarMap get_env_vars()
|
|||||||
const char* value = name;
|
const char* value = name;
|
||||||
while (*value != 0 and *value != '=')
|
while (*value != 0 and *value != '=')
|
||||||
++value;
|
++value;
|
||||||
env_vars.insert({{name, value}, (*value == '=') ? value+1 : String{}});
|
env_vars.insert({String{String::NoCopy{}, {name, value}},
|
||||||
|
(*value == '=') ? String{String::NoCopy{}, value+1} : String{}});
|
||||||
}
|
}
|
||||||
return env_vars;
|
return env_vars;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user