for_each_*_object: take flag arguments as enum

It's not wrong to pass our flags in an "unsigned", as we
know it will be at least as large as the enum.  However,
using the enum in the declaration makes it more obvious
where to find the list of flags.

While we're here, let's also drop the "extern" noise-words
from the declarations, per our modern coding style.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2018-08-10 19:09:44 -04:00
committed by Junio C Hamano
parent 202e7f1e16
commit a7ff6f5a0f
4 changed files with 9 additions and 5 deletions

View File

@ -2146,7 +2146,8 @@ static int loose_from_alt_odb(struct alternate_object_database *alt,
return r;
}
int for_each_loose_object(each_loose_object_fn cb, void *data, unsigned flags)
int for_each_loose_object(each_loose_object_fn cb, void *data,
enum for_each_object_flags flags)
{
struct loose_alt_odb_data alt;
int r;