1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 22:42:41 +01:00

Use StringMap instead of std::map<std::string, std::string> throughout the codebase

This commit is contained in:
Sergei Zimmerman 2025-05-19 20:33:28 +00:00
parent 8c10104e9e
commit 8ee513379a
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
26 changed files with 37 additions and 37 deletions

View file

@ -70,9 +70,9 @@ std::string percentDecode(std::string_view in)
return decoded;
}
std::map<std::string, std::string> decodeQuery(const std::string & query)
StringMap decodeQuery(const std::string & query)
{
std::map<std::string, std::string> result;
StringMap result;
for (const auto & s : tokenizeString<Strings>(query, "&")) {
auto e = s.find('=');
@ -108,7 +108,7 @@ std::string percentEncode(std::string_view s, std::string_view keep)
return res;
}
std::string encodeQuery(const std::map<std::string, std::string> & ss)
std::string encodeQuery(const StringMap & ss)
{
std::string res;
bool first = true;