mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibCore: Convert CFile to ObjectPtr
This commit is contained in:
@@ -37,13 +37,13 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CFile file(argv[1]);
|
||||
if (!file.open(CIODevice::ReadOnly)) {
|
||||
fprintf(stderr, "Error: Cannot open %s: %s\n", argv[1], file.error_string());
|
||||
auto file = CFile::construct(argv[1]);
|
||||
if (!file->open(CIODevice::ReadOnly)) {
|
||||
fprintf(stderr, "Error: Cannot open %s: %s\n", argv[1], file->error_string());
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto file_contents = file.read_all();
|
||||
auto file_contents = file->read_all();
|
||||
|
||||
Vector<Endpoint> endpoints;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user