aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Spankbang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Spankbang.cpp')
-rw-r--r--src/plugins/Spankbang.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/plugins/Spankbang.cpp b/src/plugins/Spankbang.cpp
index cc35d39..ac0e371 100644
--- a/src/plugins/Spankbang.cpp
+++ b/src/plugins/Spankbang.cpp
@@ -21,10 +21,6 @@ namespace {
}
namespace QuickMedia {
- static bool begins_with(const char *str, const char *begin_with) {
- return strncmp(str, begin_with, strlen(begin_with)) == 0;
- }
-
static void html_cleanup(HtmlElement *html_element_root) {
for(HtmlElement *child_html_element : html_element_root->children) {
html_cleanup(child_html_element);
@@ -59,14 +55,11 @@ namespace QuickMedia {
}
}
- static HtmlElement* html_parse(char *source, size_t size) {
+ static HtmlElement* html_parse(const char *source, size_t size) {
HtmlElement *html_element_root = new HtmlElement();
HtmlParseUserdata parse_userdata;
parse_userdata.current_html_element = html_element_root;
- HtmlParser html_parser;
- html_parser_init(&html_parser, source, size, html_page_callback, &parse_userdata);
- html_parser_parse(&html_parser);
- html_parser_deinit(&html_parser);
+ html_parser_parse(source, size, html_page_callback, &parse_userdata);
return html_element_root;
}