Commit 4df4d1cf authored by David Faure's avatar David Faure

Speedup: don't create a DocumentImpl and delete it right away (copy ctor and operator=)

svn path=/trunk/kdelibs/; revision=125643
parent 7217bec3
......@@ -71,8 +71,7 @@ HTMLDocument &HTMLDocument::operator = (const Node &other)
impl = 0;
return *this;
}
Document d;
d = other;
Document d(other);
if(!d.isHTMLDocument())
impl = 0;
else
......
......@@ -82,7 +82,7 @@ public:
*/
HTMLDocument(KHTMLView *parent);
HTMLDocument(const HTMLDocument &other);
HTMLDocument(const Node &other) : Document()
HTMLDocument(const Node &other) : Document(false)
{(*this)=other;}
protected:
HTMLDocument(HTMLDocumentImpl *impl);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment