Andre Poenitz <[EMAIL PROTECTED]> writes:

| What is
>
|  void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
>
| good for? The auto-generated copy constructor would be fine, wouldn't it?
>

This should change as well:

InsetGraphicsParams &
InsetGraphicsParams::operator=(InsetGraphicsParams const & params)
{
        // Are we assigning the object into itself?
        if (this == &params)
                return * this;
        copy(params);
        return *this;
}


something linke:

InsetGraphicsParams &
InsetGraphicsParams::operator=(InsetGraphicsParams const & params)
{
        InsetGraphicsParams tmp(params);
        tmp.swap(*this);
}


Yes, you need to implement a non-throwing swap function, but then you
are typesafe.

-- 
        Lgb

Reply via email to