> Short form:
>
> Fl_Shared_Image::copy() should return the proper
> type (Fl_Shared_Image* instead of Fl_Image*), and
> Fl_Shared_Image::refcount() should be private or
> protected.
>
>
> Long form:
>
> Problem #1:
>
> There are two copy methods:
>
>    virtual Fl_Image *copy(int W, int H);
>    Fl_Image *copy() { return copy(w(), h()); }
./..
> Albrecht
Also, it really shocks me to see overloaded copy() methods in derived classes 
of Fl_Image, a fast inspection shows that it only calls the copy(w(),h()) 
virtual method.
So we should also _remove_ all overloaded  copy() methods because they 
duplicate the base class copy behavior.

Also, It has to be made clear that we *don't* need to overload this method in 
derived class because copy(int,int) is virtual already so it will call the 
correct copy(int, int) overloaded method.

Only the Fl_Image::copy(int W, int H) should be overloaded.

Moreover, If by any (mal)chance, there is one Fl_Image::copy() method that does 
anything else than calling copy(w(), h()) then it should be *renamed* to 
another name.

Fabien

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to