Hi Warp, you recently wrote in povray.general:
> Thorsten Froehlich <tho### [at] trfde> wrote:
> : return new SubClass(*this);
>
> Uh. That hurts my eyes.
Why? That's the standard way of cloning an object (standard in the
sense of widely used). Simply invoke the copy constructor on the
current instance. How else would you write a Clone() or Copy()
function?
- Lutz
email : lut### [at] stmuccom
Web : http://www.stmuc.com/moray
Post a reply to this message
|