mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:55:07 +00:00
LibCore: Convert CFile to ObjectPtr
This commit is contained in:
parent
31b38ed88f
commit
8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -12,9 +12,9 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
CFile f(argc == 1 ? "/home/anon/small.html" : argv[1]);
|
||||
if (!f.open(CIODevice::ReadOnly)) {
|
||||
fprintf(stderr, "Error: %s\n", f.error_string());
|
||||
auto f = CFile::construct(argc == 1 ? "/home/anon/small.html" : argv[1]);
|
||||
if (!f->open(CIODevice::ReadOnly)) {
|
||||
fprintf(stderr, "Error: %s\n", f->error_string());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ int main(int argc, char** argv)
|
|||
auto sheet = parse_css(css);
|
||||
dump_sheet(sheet);
|
||||
|
||||
String html = String::copy(f.read_all());
|
||||
String html = String::copy(f->read_all());
|
||||
auto document = parse_html(html);
|
||||
dump_tree(document);
|
||||
document->add_sheet(*sheet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue