1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

treewide: Sprinkle more anonymous namespace for classes private to TUs

This code should be private to the corresponding translation units.
This commit is contained in:
Sergei Zimmerman 2025-08-05 02:25:40 +03:00
parent 0118e5ea5d
commit 866d5e6cf4
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View file

@ -81,6 +81,8 @@ std::optional<std::string> RootArgs::needsCompletion(std::string_view s)
return {}; return {};
} }
namespace {
/** /**
* Basically this is `typedef std::optional<Parser> Parser(std::string_view s, Strings & r);` * Basically this is `typedef std::optional<Parser> Parser(std::string_view s, Strings & r);`
* *
@ -246,6 +248,8 @@ void ParseQuoted::operator()(std::shared_ptr<Parser> & state, Strings & r)
assert(false); assert(false);
} }
} // namespace
Strings parseShebangContent(std::string_view s) Strings parseShebangContent(std::string_view s)
{ {
Strings result; Strings result;

View file

@ -10,11 +10,15 @@
namespace nix { namespace nix {
namespace {
struct Info struct Info
{ {
std::string outputName; std::string outputName;
}; };
} // namespace
// name -> version -> store paths // name -> version -> store paths
typedef std::map<std::string, std::map<std::string, std::map<StorePath, Info>>> GroupedPaths; typedef std::map<std::string, std::map<std::string, std::map<StorePath, Info>>> GroupedPaths;