LibCore: Convert CFile to ObjectPtr

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

View file

@ -36,14 +36,14 @@ void CConfigFile::reparse()
{
m_groups.clear();
CFile file(m_file_name);
if (!file.open(CIODevice::OpenMode::ReadOnly))
auto file = CFile::construct(m_file_name);
if (!file->open(CIODevice::OpenMode::ReadOnly))
return;
HashMap<String, String>* current_group = nullptr;
while (file.can_read_line()) {
auto line = file.read_line(BUFSIZ);
while (file->can_read_line()) {
auto line = file->read_line(BUFSIZ);
auto* cp = (const char*)line.pointer();
while (*cp && (*cp == ' ' || *cp == '\t' || *cp == '\n'))