Please sign in to comment.
diff-lib, read-tree, unpack-trees: mark cache_entry array paramters c…
…onst Change the type merge_fn_t to accept the array of cache_entry pointers as const pointers to const pointers. This documents the fact that the merge functions don't modify the cache_entry contents or replace any of the pointers in the array. Only a single cast is necessary in unpack_nondirectories because adding two const modifiers at once is not allowed in C. The cast is safe in that it doesn't mask any modfication; call_unpack_fn only needs the array for reading. Signed-off-by: René Scharfe <firstname.lastname@example.org> Signed-off-by: Junio C Hamano <email@example.com>
- Loading branch information...
Showing with 26 additions and 15 deletions.