Skip to content

Commit 9d91ad8

Browse files
committed
LogicalDiskManager: DatabaseRecord: Clone: Improved code readability
1 parent 077a14d commit 9d91ad8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

DiskAccessLibrary/LogicalDiskManager/DatabaseRecords/DatabaseRecord.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2014 Tal Aloni <[email protected]>. All rights reserved.
1+
/* Copyright (C) 2014-2018 Tal Aloni <[email protected]>. All rights reserved.
22
*
33
* You can redistribute this program and/or modify it under the terms of
44
* the GNU Lesser Public License as published by the Free Software Foundation,
@@ -354,10 +354,8 @@ public override int GetHashCode()
354354
public virtual DatabaseRecord Clone()
355355
{
356356
// We do not want to clone the original fragments
357-
List<DatabaseRecordFragment> fragments = m_fragments;
358-
m_fragments = new List<DatabaseRecordFragment>();
359357
DatabaseRecord clone = (DatabaseRecord)MemberwiseClone();
360-
m_fragments = fragments;
358+
clone.m_fragments = new List<DatabaseRecordFragment>();
361359
return clone;
362360
}
363361
}

0 commit comments

Comments
 (0)