A bit more RAII for DilloHtml...
This commit is contained in:
@ -353,10 +353,8 @@ static void Menu_popup_cb(void *data)
|
||||
* Page popup menu (construction & popup)
|
||||
*/
|
||||
void a_Menu_page_popup(BrowserWindow *bw, const DilloUrl *url,
|
||||
bool_t has_bugs, void *v_cssUrls)
|
||||
bool_t has_bugs, std::vector< std::unique_ptr< DilloUrl > > *cssUrls)
|
||||
{
|
||||
lout::misc::SimpleVector <DilloUrl*> *cssUrls =
|
||||
(lout::misc::SimpleVector <DilloUrl*> *) v_cssUrls;
|
||||
int j = 0;
|
||||
|
||||
static Fl_Menu_Item *stylesheets = NULL;
|
||||
@ -402,7 +400,7 @@ void a_Menu_page_popup(BrowserWindow *bw, const DilloUrl *url,
|
||||
memset(stylesheets, '\0', (cssUrls->size() + 1) * sizeof(Fl_Menu_Item));
|
||||
|
||||
for (j = 0; j < cssUrls->size(); j++) {
|
||||
DilloUrl *url = cssUrls->get(j);
|
||||
DilloUrl *url = cssUrls->at(j).get();
|
||||
const char *url_str = URL_STR(url);
|
||||
const uint_t head_length = 30, tail_length = 40,
|
||||
url_len = strlen(url_str);
|
||||
|
||||
Reference in New Issue
Block a user