Skip to content

Commit 167bd10

Browse files
committed
Removed some unused (#if'd out) code in MimeReader.cs
1 parent f05cefb commit 167bd10

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

MimeKit/MimeReader.cs

-54
Original file line numberDiff line numberDiff line change
@@ -1212,20 +1212,12 @@ unsafe bool StepByteOrderMark (byte* inbuf, CancellationToken cancellationToken)
12121212

12131213
static unsafe bool IsMboxMarker (byte* text, bool allowMunged = false)
12141214
{
1215-
#if COMPARE_QWORD
1216-
const ulong FromMask = 0x000000FFFFFFFFFF;
1217-
const ulong From = 0x000000206D6F7246;
1218-
ulong* qword = (ulong*) text;
1219-
1220-
return (*qword & FromMask) == From;
1221-
#else
12221215
byte* inptr = text;
12231216

12241217
if (allowMunged && *inptr == (byte) '>')
12251218
inptr++;
12261219

12271220
return *inptr++ == (byte) 'F' && *inptr++ == (byte) 'r' && *inptr++ == (byte) 'o' && *inptr++ == (byte) 'm' && *inptr == (byte) ' ';
1228-
#endif
12291221
}
12301222

12311223
static unsafe bool IsMboxMarker (byte[] text, bool allowMunged = false)
@@ -1486,56 +1478,10 @@ unsafe bool StepHeaderValue (byte* inbuf, ref bool midline)
14861478

14871479
*inend = (byte) '\n';
14881480

1489-
#if false
1490-
if (midline) {
1491-
while (*inptr != (byte) '\n')
1492-
inptr++;
1493-
1494-
if (inptr < inend) {
1495-
// Consume the newline and update our parse state.
1496-
inptr++;
1497-
1498-
index = (int) (inptr - inbuf);
1499-
IncrementLineNumber (index);
1500-
1501-
midline = false;
1502-
} else {
1503-
// We've reached the end of the input buffer.
1504-
}
1505-
}
1506-
#endif
1507-
15081481
while (inptr < inend && (midline || IsBlank (*inptr))) {
15091482
// TODO: unroll this loop?
1510-
#if FUNROLL_LOOPS
1511-
// Note: we can always depend on byte[] arrays being 4-byte aligned on 32bit and 64bit architectures
1512-
int alignment = (index + 3) & ~3;
1513-
byte* aligned = inbuf + alignment;
1514-
byte c = *aligned;
1515-
1516-
*aligned = (byte) '\n';
15171483
while (*inptr != (byte) '\n')
15181484
inptr++;
1519-
*aligned = c;
1520-
1521-
if (inptr == aligned && c != (byte) '\n') {
1522-
// -funroll-loops, yippee ki-yay.
1523-
uint* dword = (uint*) inptr;
1524-
uint mask;
1525-
1526-
do {
1527-
mask = *dword++ ^ 0x0A0A0A0A;
1528-
mask = ((mask - 0x01010101) & (~mask & 0x80808080));
1529-
} while (mask == 0);
1530-
1531-
inptr = (byte*) (dword - 1);
1532-
while (*inptr != (byte) '\n')
1533-
inptr++;
1534-
}
1535-
#else
1536-
while (*inptr != (byte) '\n')
1537-
inptr++;
1538-
#endif
15391485

15401486
if (inptr == inend) {
15411487
// We've reached the end of the input buffer, and we are currently in the middle of a line.

0 commit comments

Comments
 (0)