rapp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Rapp-dev] Please also look at 7b42, fixing binary morph padding


From: Hans-Peter Nilsson
Subject: Re: [Rapp-dev] Please also look at 7b42, fixing binary morph padding
Date: Wed, 15 Dec 2010 05:05:22 +0100

> Date: Wed, 15 Dec 2010 01:04:21 +0100
> From: Johan Almbladh <address@hidden>

> It looks to me that the original code for rectangular SEs actually
> allowed different paddings in horizontal and vertial directions. Maybe
> we should consider allowing it?

Yes, we can certainly do that in 0.7.  I took your earlier
advice and adjusted the code as the documentation required this
padding it, but if you can see no (implementation) benefit from
that, usability would improve by changing it.  (Our internal
users are still out on the issue, they might request a new
release fixing this and/or other issues.)

> I also see that the internal driver for what is called isotropic SEs
> (rapp_morph_isotropic) also checks its arguments, because it is called
> directly from disc, octagon and diamond functions. However, it is also
> called from the rectangular function for 1xm and nx1 SEs after
> validation. If the argument validation becomes heavier we might want
> to do that only once.

Hm, you're right.  If Someone would like to do this before I do
(which might not happen for some time), then for reasons of code
maintainability please split out the checks into a new function
rapp_morph_isotropic_checked (ending in a call to a
rapp_morph_isotropic that doesn't have the checks) and change
all direct callers (i.e. those without overlap checks on their
own) to use *that* function (or maybe better the other way
round: call the unchecked version rapp_morph_isotropic_unchecked
and change the checked callers).

This, rather than moving the checks back into each direct caller
of rapp_morph_isotropic_checked; that'd more duplicated code in
source (and probably object form).

brgds, H-P



reply via email to

[Prev in Thread] Current Thread [Next in Thread]