mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Loop can be converted into LINQ-expression.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
@@ -1207,8 +1208,7 @@ namespace DiscImageChef.DiscImages
|
||||
#region private methods
|
||||
static uint VhdChecksum(byte[] data)
|
||||
{
|
||||
uint checksum = 0;
|
||||
foreach(byte b in data) checksum += b;
|
||||
uint checksum = data.Aggregate<byte, uint>(0, (current, b) => current + b);
|
||||
|
||||
return ~checksum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user