diff options
author | Ben Burdette <bburdette@protonmail.com> | 2022-04-07 13:42:01 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@protonmail.com> | 2022-04-07 13:42:01 -0600 |
commit | 1a93ac8133381eb692416c4e46b1706faa5cd89f (patch) | |
tree | 9a559f977ad6213c055099f6f2ab6be96f0c551b /src/nix-store/graphml.cc | |
parent | d2ec9b4e15718e42720787140d7825dcbfd73249 (diff) | |
parent | 8b1e328d5d0ae7d3a4a8f6012ec065b59674ed4a (diff) |
Merge remote-tracking branch 'upstream/master' into upstream-merge
Diffstat (limited to 'src/nix-store/graphml.cc')
-rw-r--r-- | src/nix-store/graphml.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-store/graphml.cc b/src/nix-store/graphml.cc index 8ca5c9c8d..425d61e53 100644 --- a/src/nix-store/graphml.cc +++ b/src/nix-store/graphml.cc @@ -19,20 +19,20 @@ static inline std::string_view xmlQuote(std::string_view s) } -static string symbolicName(const std::string & p) +static std::string symbolicName(std::string_view p) { - return string(p, p.find('-') + 1); + return std::string(p.substr(0, p.find('-') + 1)); } -static string makeEdge(std::string_view src, std::string_view dst) +static std::string makeEdge(std::string_view src, std::string_view dst) { return fmt(" <edge source=\"%1%\" target=\"%2%\"/>\n", xmlQuote(src), xmlQuote(dst)); } -static string makeNode(const ValidPathInfo & info) +static std::string makeNode(const ValidPathInfo & info) { return fmt( " <node id=\"%1%\">\n" |