aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Mangatown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Mangatown.cpp')
-rw-r--r--src/plugins/Mangatown.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/Mangatown.cpp b/src/plugins/Mangatown.cpp
index 67f4c29..0964310 100644
--- a/src/plugins/Mangatown.cpp
+++ b/src/plugins/Mangatown.cpp
@@ -22,7 +22,7 @@ namespace QuickMedia {
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
const char *text = quickmedia_html_node_get_text(node);
if(href && text && strncmp(href, "/manga/", 7) == 0) {
- auto item = std::make_unique<BodyItem>(strip(text));
+ auto item = BodyItem::create(strip(text));
item->url = mangatown_url + href;
item_data->push_back(std::move(item));
}
@@ -76,10 +76,10 @@ namespace QuickMedia {
for(const Json::Value &child : json_suggestions) {
if(!child.isString()) {
- result_items.push_back(std::make_unique<BodyItem>(""));
+ result_items.push_back(BodyItem::create(""));
continue;
}
- result_items.push_back(std::make_unique<BodyItem>(child.asString()));
+ result_items.push_back(BodyItem::create(child.asString()));
}
size_t index = 0;
@@ -88,7 +88,7 @@ namespace QuickMedia {
if(index < result_items.size()) {
body_item = result_items[index].get();
} else {
- result_items.push_back(std::make_unique<BodyItem>(""));
+ result_items.push_back(BodyItem::create(""));
body_item = result_items.back().get();
}
@@ -123,7 +123,7 @@ namespace QuickMedia {
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
const char *title = quickmedia_html_node_get_attribute_value(node, "title");
if(href && title && strncmp(href, "/manga/", 7) == 0) {
- auto item = std::make_unique<BodyItem>(strip(title));
+ auto item = BodyItem::create(strip(title));
item->url = mangatown_url + href;
item_data->push_back(std::move(item));
}