Re: Testing notification code in speller_impl.cpp

Kevin Atkinson <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <Pine.LNX.4.44.0502142058400.1574-100000@kevin-p3.atkinson.dhs.org>
On Mon, 14 Feb 2005, Gary Setter wrote:

> Hi,
> I wrote yesterday that one of my hang ups with win32 patches was
> the arrary of UpdateMember with an initalization expression. The
> Aspell 0.5 code was not very presentable. I asked for ideas, but
> nothing came in.
> 
> I made my own attempt. Rather then storing a function pointer, I
> made an enum for each notification function and a call function
> that calls the right one.

I don't like that solution at all.  For one thing it makes it diffacult to 
add new notifiers in the future.

I think it is better to assign to the array in a helper function that is 
called exactly once.

If you want you can post both solutions so I can decide which solution is  
better, if any.

--- 
http://kevin.atkinson.dhs.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.