Skip to content

Commit 0e4a6b1

Browse files
committed
refactor(propagateupload): use in-class initializers for bitfield members
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
1 parent f1c10ce commit 0e4a6b1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/libsync/propagateupload.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ bool PollJob::finished()
180180

181181
PropagateUploadFileCommon::PropagateUploadFileCommon(OwncloudPropagator *propagator, const SyncFileItemPtr &item)
182182
: PropagateItemJob(propagator, item)
183-
, _finished(false)
184-
, _deleteExisting(false)
185-
, _aborting(false)
186183
{
187184
const auto path = _item->_file;
188185
const auto slashPosition = path.lastIndexOf('/');

src/libsync/propagateupload.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ class PropagateUploadFileCommon : public PropagateItemJob
204204

205205
protected:
206206
QVector<AbstractNetworkJob *> _jobs; /// network jobs that are currently in transit
207-
bool _finished BITFIELD(1); /// Tells that all the jobs have been finished
208-
bool _deleteExisting BITFIELD(1);
207+
bool _finished BITFIELD(1) = false; /// Tells that all the jobs have been finished
208+
bool _deleteExisting BITFIELD(1) = false;
209209

210210
/** Whether an abort is currently ongoing.
211211
*
212212
* Important to avoid duplicate aborts since each finishing PUTFileJob might
213213
* trigger an abort on error.
214214
*/
215-
bool _aborting BITFIELD(1);
215+
bool _aborting BITFIELD(1) = false;
216216

217217
/* This is a minified version of the SyncFileItem,
218218
* that holds only the specifics about the file that's

0 commit comments

Comments
 (0)