1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 15:31:47 +02:00

Use auto with some FileIngestionMethod local variables

This commit is contained in:
John Ericson 2020-03-30 18:15:55 -04:00
parent 225e62a56a
commit bbbb7c1bc7
2 changed files with 3 additions and 3 deletions

View file

@ -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;