diff options
author | Oleksii Lysenko <lysenkoalexmail@gmail.com> | 2021-09-16 17:31:06 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-09-17 14:36:15 +0300 |
commit | 9879167fc325559d972822ac515cad852b565334 (patch) | |
tree | a14fc1b27d8f64aed075b161f59c2e37c2949a6e /src/libsync/propagateuploadng.cpp | |
parent | ad06eb1706880efb64b017c404b005738db8765e (diff) |
Used make_unique instead of direct unique_ptr construction
Diffstat (limited to 'src/libsync/propagateuploadng.cpp')
-rw-r--r-- | src/libsync/propagateuploadng.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsync/propagateuploadng.cpp b/src/libsync/propagateuploadng.cpp index e384becb0..40086bdac 100644 --- a/src/libsync/propagateuploadng.cpp +++ b/src/libsync/propagateuploadng.cpp @@ -383,8 +383,8 @@ void PropagateUploadFileNG::startNextChunk() abortWithError(SyncFileItem::SoftError, tr("%1 the file is currently in use").arg(fileName)); return; } - auto device = std::unique_ptr<UploadDevice>(new UploadDevice( - fileName, _currentChunkOffset, _currentChunkSize, &propagator()->_bandwidthManager)); + auto device = std::make_unique<UploadDevice>(fileName, _currentChunkOffset, _currentChunkSize, + &propagator()->_bandwidthManager); if (!device->open(QIODevice::ReadOnly)) { qCWarning(lcPropagateUploadNG) << "Could not prepare upload device: " << device->errorString(); // Soft error because this is likely caused by the user modifying his files while syncing |