style(3p/nix): Remove 'using std::*' from types.hh
It is considered bad form to use things from includes in headers, as these directives propagate to everywhere else and can make it confusing. types.hh (which is includes almost literally everywhere) had some of these directives, which this commit removes.
This commit is contained in:
parent
f30b2e610d
commit
838f86b0fd
85 changed files with 859 additions and 821 deletions
14
third_party/nix/src/libutil/config.cc
vendored
14
third_party/nix/src/libutil/config.cc
vendored
|
|
@ -82,23 +82,23 @@ void Config::getSettings(std::map<std::string, SettingInfo>& res,
|
|||
|
||||
void AbstractConfig::applyConfigFile(const Path& path) {
|
||||
try {
|
||||
string contents = readFile(path);
|
||||
std::string contents = readFile(path);
|
||||
|
||||
unsigned int pos = 0;
|
||||
|
||||
while (pos < contents.size()) {
|
||||
string line;
|
||||
std::string line;
|
||||
while (pos < contents.size() && contents[pos] != '\n') {
|
||||
line += contents[pos++];
|
||||
}
|
||||
pos++;
|
||||
|
||||
string::size_type hash = line.find('#');
|
||||
if (hash != string::npos) {
|
||||
line = string(line, 0, hash);
|
||||
std::string::size_type hash = line.find('#');
|
||||
if (hash != std::string::npos) {
|
||||
line = std::string(line, 0, hash);
|
||||
}
|
||||
|
||||
auto tokens = tokenizeString<vector<string> >(line);
|
||||
auto tokens = tokenizeString<std::vector<std::string> >(line);
|
||||
if (tokens.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ void AbstractConfig::applyConfigFile(const Path& path) {
|
|||
path);
|
||||
}
|
||||
|
||||
string name = tokens[0];
|
||||
std::string name = tokens[0];
|
||||
|
||||
auto i = tokens.begin();
|
||||
advance(i, 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue