summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/ConfigFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCore/ConfigFile.cpp')
-rw-r--r--Userland/Libraries/LibCore/ConfigFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibCore/ConfigFile.cpp b/Userland/Libraries/LibCore/ConfigFile.cpp
index f55ec626ef..7bb69df9ac 100644
--- a/Userland/Libraries/LibCore/ConfigFile.cpp
+++ b/Userland/Libraries/LibCore/ConfigFile.cpp
@@ -20,25 +20,25 @@ NonnullRefPtr<ConfigFile> ConfigFile::get_for_lib(const String& lib_name)
String directory = StandardPaths::config_directory();
auto path = String::formatted("{}/lib/{}.ini", directory, lib_name);
- return adopt(*new ConfigFile(path));
+ return adopt_ref(*new ConfigFile(path));
}
NonnullRefPtr<ConfigFile> ConfigFile::get_for_app(const String& app_name)
{
String directory = StandardPaths::config_directory();
auto path = String::formatted("{}/{}.ini", directory, app_name);
- return adopt(*new ConfigFile(path));
+ return adopt_ref(*new ConfigFile(path));
}
NonnullRefPtr<ConfigFile> ConfigFile::get_for_system(const String& app_name)
{
auto path = String::formatted("/etc/{}.ini", app_name);
- return adopt(*new ConfigFile(path));
+ return adopt_ref(*new ConfigFile(path));
}
NonnullRefPtr<ConfigFile> ConfigFile::open(const String& path)
{
- return adopt(*new ConfigFile(path));
+ return adopt_ref(*new ConfigFile(path));
}
ConfigFile::ConfigFile(const String& file_name)