James Montgomerie wrote:
> The use of DELETEP with a cast inside it is causing problems
[...]
> Specifically, lines like:
> 
> DELETEP(static_cast<EV_Menu_Action *> (tmp));
> 
> are throwing up this compilation error:
> 
> ANSI C++ forbids cast to non-reference type used as lvalue.

One could possibly use

static_cast<EV_Menu_Action&*>

but that would just be even more ugly.

> I haven't posted a patch. because I couldn't decide which solution was 
> the most 'correct' or understandable.

I still think the most both correct and understandable is:

    delete tmp;
    tmp = 0;

/Mike


Reply via email to