Use std::make_unique

This commit is contained in:
Chocobo1 2023-05-06 21:36:31 +08:00
parent e375f3ee0b
commit 29c05ed3e8
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -177,7 +177,7 @@ std::unique_ptr<QSettings> Private::CustomProfile::applicationSettings(const QSt
const auto CONF_FILE_EXTENSION = u".conf"_qs;
#endif
const Path settingsFilePath = configLocation() / Path(name + CONF_FILE_EXTENSION);
return std::unique_ptr<QSettings>(new QSettings(settingsFilePath.data(), QSettings::IniFormat));
return std::make_unique<QSettings>(settingsFilePath.data(), QSettings::IniFormat);
}
Path Private::NoConvertConverter::fromPortablePath(const Path &portablePath) const