Re: [PATCH v3 3/8] wt-status: move wt_status_colors[] into wt_status structure
- From
Jeff King <peff@peff.net>
- Date
- Aug 10, 2009, 09:12 UTC
- Message-ID
- <20090810091250.GB7513@coredump.intra.peff.net>
- In-Reply-To
- <1249894465-11018-4-git-send-email-gitster@pobox.com>
On Mon, Aug 10, 2009 at 01:54:20AM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> @@ -37,6 +38,7 @@ struct wt_status {
> int wt_status_relative_paths;
> int wt_status_submodule_summary;
> enum untracked_status_type show_untracked_files;
> + char wt_status_colors[6][COLOR_MAXLEN];Yuck on the magic "6". It should be safe to use
ARRAY_SIZE(wt_status_colors_default)
since that is computed purely from sizeof's. Though I am not discounting the possibility that there are compilers which will screw it up.
-Peff