Simplify some ownership on DilloHtml.
This commit is contained in:
@ -473,7 +473,7 @@ DilloHtml::DilloHtml(BrowserWindow *p_bw, const DilloUrl *url,
|
||||
DocType = DT_NONE; /* assume Tag Soup 0.0! :-) */
|
||||
DocTypeVersion = 0.0f;
|
||||
|
||||
styleEngine = new StyleEngine (HT2LT (this), page_url, base_url, bw->zoom);
|
||||
styleEngine = std::make_unique< StyleEngine >(HT2LT (this), page_url, base_url, bw->zoom);
|
||||
|
||||
cssUrls = new misc::SimpleVector <DilloUrl*> (1);
|
||||
|
||||
@ -578,8 +578,6 @@ DilloHtml::~DilloHtml()
|
||||
dFree(img);
|
||||
}
|
||||
delete (images);
|
||||
|
||||
delete styleEngine;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -188,7 +188,7 @@ public: //BUG: for now everything is public
|
||||
lout::misc::SimpleVector<DilloUrl*> *cssUrls;
|
||||
|
||||
lout::misc::SimpleVector<DilloHtmlState> *stack;
|
||||
StyleEngine *styleEngine;
|
||||
std::unique_ptr< StyleEngine > styleEngine;
|
||||
|
||||
int InFlags; /**< tracks which elements we are in */
|
||||
|
||||
|
Reference in New Issue
Block a user