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:
parent
31b38ed88f
commit
8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue