mirror of
https://github.com/aaru-dps/AaruBenchmark.git
synced 2025-12-16 19:24:36 +00:00
General refactor and cleanup.
This commit is contained in:
@@ -50,8 +50,7 @@ public class AppleRle
|
||||
var repeatMode = false; // true if we're repeating, false if we're just copying
|
||||
int inPosition = 0, outPosition = 0;
|
||||
|
||||
while(inPosition <= source.Length &&
|
||||
outPosition <= destination.Length)
|
||||
while(inPosition <= source.Length && outPosition <= destination.Length)
|
||||
{
|
||||
switch(repeatMode)
|
||||
{
|
||||
@@ -82,8 +81,7 @@ public class AppleRle
|
||||
continue;
|
||||
}
|
||||
|
||||
if(inPosition == source.Length)
|
||||
break;
|
||||
if(inPosition == source.Length) break;
|
||||
|
||||
while(true)
|
||||
{
|
||||
@@ -91,10 +89,7 @@ public class AppleRle
|
||||
byte b2 = source[inPosition++];
|
||||
var s = (short)(b1 << 8 | b2);
|
||||
|
||||
if(s == 0 ||
|
||||
s >= DART_CHUNK ||
|
||||
s <= -DART_CHUNK)
|
||||
continue;
|
||||
if(s == 0 || s >= DART_CHUNK || s <= -DART_CHUNK) continue;
|
||||
|
||||
if(s < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user