Convert if to switch statement.

This commit is contained in:
2022-11-13 19:38:02 +00:00
parent c1196f636d
commit cd2d27c2cf
2 changed files with 18 additions and 8 deletions

View File

@@ -62,11 +62,17 @@ public static class PrintHex
int offsetLength = $"{array.Length:X}".Length;
var sb = new StringBuilder();
if(last > 0)
rows++;
switch(last)
{
case > 0:
rows++;
if(last == 0)
last = width;
break;
case 0:
last = width;
break;
}
if(offsetLength < str.Length)
offsetLength = str.Length;