mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Use helper functions to construct smart pointers
This commit is contained in:
parent
ca01b049a6
commit
2157e500ef
7 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue