about summary refs log tree commit diff
path: root/src/nix-store/dotgraph.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-05-02T11·56+0200
committerEelco Dolstra <edolstra@gmail.com>2018-05-02T11·56+0200
commit53ec5ac69f59ac435b18297a594933e83e236766 (patch)
treef50797b3f3338de1d471a9b6f3b3e377813f09c9 /src/nix-store/dotgraph.cc
parent548ad391d96d8922d0f8c35b5dd72bf4fb7e3ed1 (diff)
Fix some random -Wconversion warnings
Diffstat (limited to 'src/nix-store/dotgraph.cc')
-rw-r--r--src/nix-store/dotgraph.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nix-store/dotgraph.cc b/src/nix-store/dotgraph.cc
index 51dedcf0a092..abdfa5e58f93 100644
--- a/src/nix-store/dotgraph.cc
+++ b/src/nix-store/dotgraph.cc
@@ -47,8 +47,7 @@ static string makeNode(const string & id, const string & label,
 static string symbolicName(const string & path)
 {
     string p = baseNameOf(path);
-    int dash = p.find('-');
-    return string(p, dash + 1);
+    return string(p, p.find('-') + 1);
 }