Const would be nice, but would give a compile error in all these locations.
conflict__get_conflict() is a static function that return a non const skel
to allow editing/extending the skel.
I'm not sure where to bend the rules on const, but with my compiler not
giving all the same warnings as gcc I try to keep on the safe side.
Creating a helper function for this 3* block looks like overkill. Especially
since this code is unstable at this time. (Although I would expect this
specific part to be pretty stable)
Bert
From: Greg Stein [mailto:[email protected]]
Sent: zaterdag 30 juni 2012 13:12
To: [email protected]
Subject: Re: svn commit: r1355692 - in /subversion/trunk/subversion:
libsvn_wc/conflicts.c libsvn_wc/conflicts.h libsvn_wc/wc_db.c
tests/libsvn_wc/conflict-data-test.c
On Jun 30, 2012 7:00 AM, <[email protected]> wrote:
>...
> @@ -627,6 +630,33 @@ svn_wc__conflict_read_info(svn_wc_operat
> else if (locations)
> *locations = NULL;
>
> + if (text_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_TEXT));
> +
> + *text_conflicted = (c_skel != NULL);
> + }
> +
> + if (prop_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_PROP));
> +
> + *prop_conflicted = (c_skel != NULL);
> + }
> +
> + if (tree_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_TREE));
> +
> + *tree_conflicted = (c_skel != NULL);
> + }
Seriously? Maybe I need a macro to ease my reviews:
const!
>...
(and to repeat my request for blank lines between declarations and code;
those are separate semantic items, and should have visible separation)
Cheers,
-g