mirror of
https://github.com/NixOS/nix
synced 2025-07-05 20:41:47 +02:00
Improve boost hacks
This commit is contained in:
parent
8399bd6b8f
commit
0b539dea4a
11 changed files with 26 additions and 131 deletions
|
@ -1,7 +1,6 @@
|
|||
#include "network-proxy.hh"
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "environment-variables.hh"
|
||||
|
||||
|
@ -13,7 +12,9 @@ static StringSet getAllVariables()
|
|||
{
|
||||
StringSet variables = lowercaseVariables;
|
||||
for (const auto & variable : lowercaseVariables) {
|
||||
variables.insert(boost::to_upper_copy(variable));
|
||||
std::string upperVariable;
|
||||
std::transform(variable.begin(), variable.end(), upperVariable.begin(), [](unsigned char c) { return std::toupper(c); });
|
||||
variables.insert(std::move(upperVariable));
|
||||
}
|
||||
return variables;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue