Albrecht Schlosser wrote:
> ...
> The cast in the last line wouldn't be necessary if 
> Fl_Shared_Image::copy() would return what it should !
> 
> Thus my question: Should this be changed? IMHO yes, but what
> about compatibility? I think that most code would compile and
> work okay, even if we changed it. And I tested it with Ian's
> example code after my local change: it compiled and linked
> without error, as I expected, but maybe there is other code?

I'd actually vote to move the refcounting to Fl_Image, and then
Fl_Shared_Image's destructor can remove the image from the shared
image list.

> So here is my vote:
> 
> +1 for making Fl_Shared_Image::copy() return Fl_Shared_Image*.

-1, since you can't overload the return type of virtual methods.

 > ...
> Fl_Shared_Image::refcount() should *REALLY* be private or at least
> protected! This would prevent code like this:
> ...
> My vote:
> 
> +1 for making refcount() private.

If anything it needs to be protected so that subclasses can access
the count.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to