[Clam-devel] fix use of empty OutControlArray

Pau Arumi parumi at iua.upf.edu
Mon Apr 2 15:38:04 PDT 2007

En/na Zach Welch ha escrit:
> On Monday 02 April 2007 08:48, Pau Arumi wrote:
>> En/na Zach Welch ha escrit:
>>> Hi all,
>>> I found that the following trivial test case causes a bad assert in
>>> OutControlArray.  The subsequent "one-line" patch cures the problem.
>> Yes it was a bug. Thanks for spotting it and give a solution. However,
>> I've done the fix (already commited) in OutControlArray::Shrink
> Please fix InControlArray in the same way.  Also, you might add an int() cast 
> to eliminate the signed/unsigned comparison warning in the CLAM_ASSERT.

you're right and it's commited. (revision 9919)

> Really, these two classes need to share their code in a base class.

yes. i'd rather use a template class here because they basically need to
instantiate In/OutControl with some parameters.
with a template you could instantiate them like ControlArray<InControl>t
and ControlArray<OutControl>

do you want to jump in? i'm not taking this task right now since i have
other prioritised refactorings in my list.
and let's have the examples compiling to test the changes.


More information about the clam-devel mailing list