mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Use StringMap instead of std::map<std::string, std::string> throughout the codebase
This commit is contained in:
parent
8c10104e9e
commit
8ee513379a
26 changed files with 37 additions and 37 deletions
|
|
@ -31,9 +31,9 @@ std::optional<Path> getCgroupFS()
|
|||
}
|
||||
|
||||
// FIXME: obsolete, check for cgroup2
|
||||
std::map<std::string, std::string> getCgroups(const Path & cgroupFile)
|
||||
StringMap getCgroups(const Path & cgroupFile)
|
||||
{
|
||||
std::map<std::string, std::string> cgroups;
|
||||
StringMap cgroups;
|
||||
|
||||
for (auto & line : tokenizeString<std::vector<std::string>>(readFile(cgroupFile), "\n")) {
|
||||
static std::regex regex("([0-9]+):([^:]*):(.*)");
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace nix {
|
|||
|
||||
std::optional<Path> getCgroupFS();
|
||||
|
||||
std::map<std::string, std::string> getCgroups(const Path & cgroupFile);
|
||||
StringMap getCgroups(const Path & cgroupFile);
|
||||
|
||||
struct CgroupStats
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue