[PATCH v6 1/3] box: refactor key_def_set_compare_func routine
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Mar 14 10:04:47 MSK 2019
On Wed, Mar 13, 2019 at 03:15:37PM +0300, Kirill Shcherbatov wrote:
> @@ -1326,6 +1340,6 @@ tuple_compare_with_key_create(const struct key_def *def)
> void
> key_def_set_compare_func(struct key_def *def)
> {
> - def->tuple_compare = tuple_compare_create(def);
> - def->tuple_compare_with_key = tuple_compare_with_key_create(def);
> + key_def_set_tuple_compare(def);
> + key_def_set_tuple_compare_with_key(def);
> }
The two functions share a lot of code - all branching is basically the
same. I think we better merge them instead.
More information about the Tarantool-patches
mailing list