Skip to content

Commit

Permalink
Use compound assignment (IDE0074)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-visionaid committed Oct 15, 2024
1 parent 82ea3f2 commit fe444d2
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions sources/OpenMcdf/CompoundFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1780,20 +1780,15 @@ public void Save(Stream stream)
{
Sector s = sectors[i];

if (s == null)
// Load source (unmodified) sectors
// Here we have to ignore "Dirty flag" of
// sectors because we are NOT modifying the source
// in a differential way but ALL sectors need to be
// persisted on the destination stream
s ??= new Sector(sSize, sourceStream)
{
// Load source (unmodified) sectors
// Here we have to ignore "Dirty flag" of
// sectors because we are NOT modifying the source
// in a differential way but ALL sectors need to be
// persisted on the destination stream
s = new Sector(sSize, sourceStream)
{
Id = i
};

//sectors[i] = s;
}
Id = i
};

stream.Write(s.GetData(), 0, sSize);

Expand Down

0 comments on commit fe444d2

Please sign in to comment.