Fabien Costantini wrote:
> ...
> 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.

IIRC we can't do this since a virtual copy() that calls copy(w,h)
will call the wrong copy(w,h) due to a side-effect of how C++ handles
such things.

I think the best we could do is have a virtual copy() method for
each of the base classes (Fl_Image, Fl_Bitmap, Fl_Pixmap, and
Fl_RGB_Image) that calls its own copy(w,h) implementation, and those
implementations cannot be inlined.

Moreover, it is conceivable that a copy() method could do something
different/faster than copy(w,h).

-- 
______________________________________________________________________
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