Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Lysenko <lysenkoalexmail@gmail.com>2021-09-16 17:31:06 +0300
committerHannah von Reth <vonreth@kde.org>2021-09-17 14:36:15 +0300
commit9879167fc325559d972822ac515cad852b565334 (patch)
treea14fc1b27d8f64aed075b161f59c2e37c2949a6e /src/libsync/propagateuploadng.cpp
parentad06eb1706880efb64b017c404b005738db8765e (diff)
Used make_unique instead of direct unique_ptr construction
Diffstat (limited to 'src/libsync/propagateuploadng.cpp')
-rw-r--r--src/libsync/propagateuploadng.cpp4
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