Re: [RFC PATCH v2 3/5] linear-assignment.c: take "size_t", not "int" for *_count
- From
Jeff King <peff@peff.net>
- Date
- Dec 14, 2021, 13:40 UTC
- Message-ID
- <Ybie4nePnPtFLRHa@coredump.intra.peff.net>
- In-Reply-To
- <RFC-patch-v2-3.5-580b76c0759-20211210T122901Z-avarab@gmail.com>
On Fri, Dec 10, 2021 at 01:30:40PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> Future-proof and clarify the compute_assignment() interface by having > it take a "size_t" for the count of its that it's processing. For the > content itself we need to be able to store a "-1", but there's no > reason we can't use a "size_t" for the size of the number of "int"'s > we've got.
Makes sense. I'm happy to see the counts dealt with independently here, and the reasoning that we can use a straight size_t. The earlier refactoring is paying off a bit, though I think it would be possible without it.
-Peff