mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Use helper functions to construct smart pointers
This commit is contained in:
@@ -327,7 +327,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &path)
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
const std::wstring pathW {path.toStdWString()};
|
||||
std::unique_ptr<wchar_t[]> volumePath {new wchar_t[path.length() + 1] {}};
|
||||
auto volumePath = std::make_unique<wchar_t[]>(path.length() + 1);
|
||||
if (!::GetVolumePathNameW(pathW.c_str(), volumePath.get(), (path.length() + 1)))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user