aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2020-03-30 18:15:55 -0400
committerJohn Ericson <git@JohnEricson.me>2020-03-30 18:15:55 -0400
commitbbbb7c1bc7a66e1169931cda8bd863b68236726a (patch)
treebb5e162c61b3a9353525a8894402b132adf88190 /src/nix-store
parent225e62a56a7cebb030bebffb8d2bd7afe21cc64a (diff)
Use `auto` with some `FileIngestionMethod` local variables
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/nix-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 9a26eb57f..cde7d561b 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -174,7 +174,7 @@ static void opAdd(Strings opFlags, Strings opArgs)
store. */
static void opAddFixed(Strings opFlags, Strings opArgs)
{
- FileIngestionMethod recursive = FileIngestionMethod::Flat;
+ auto recursive = FileIngestionMethod::Flat;
for (auto & i : opFlags)
if (i == "--recursive") recursive = FileIngestionMethod::Recursive;
@@ -194,7 +194,7 @@ static void opAddFixed(Strings opFlags, Strings opArgs)
/* Hack to support caching in `nix-prefetch-url'. */
static void opPrintFixedPath(Strings opFlags, Strings opArgs)
{
- FileIngestionMethod recursive = FileIngestionMethod::Flat;
+ auto recursive = FileIngestionMethod::Flat;
for (auto i : opFlags)
if (i == "--recursive") recursive = FileIngestionMethod::Recursive;