1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:38:10 +00:00

LibCore: Convert CFile to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 20:50:06 +02:00
parent 31b38ed88f
commit 8d550c174e
30 changed files with 135 additions and 134 deletions

View file

@ -68,13 +68,13 @@ Options parse_options(int argc, char* argv[])
options.data = builder.to_string();
} else {
// Copy our stdin.
CFile c_stdin;
bool success = c_stdin.open(
auto c_stdin = CFile::construct();
bool success = c_stdin->open(
STDIN_FILENO,
CIODevice::OpenMode::ReadOnly,
CFile::ShouldCloseFileDescription::No);
ASSERT(success);
auto buffer = c_stdin.read_all();
auto buffer = c_stdin->read_all();
dbg() << "Read size " << buffer.size();
options.data = String((char*)buffer.data(), buffer.size());
}