EncodeChar:
-#ifdef FASTLOOP
int availableBytes = PtrDiff(pEnd, pSrc);
// don't fall into the fast decoding loop if we don't have enough bytes
// extra byte
charCount--;
}
-#endif // FASTLOOP
// no pending bits at this point
ch = 0;
*pTarget = (WCHAR)ch;
pTarget++;
-#ifdef FASTLOOP
int availableChars = PtrDiff(pAllocatedBufferEnd, pTarget);
int availableBytes = PtrDiff(pEnd, pSrc);
// subtract an extra count from pStop so that we don't overrun the input.
pStop--;
}
-#endif // FASTLOOP
Contract::Assert(pTarget <= pAllocatedBufferEnd, "[UTF8Encoding.GetChars]pTarget <= pAllocatedBufferEnd");
pTarget++;
-#ifdef FASTLOOP
// If still have fallback don't do fast loop
if (fallbackBuffer != nullptr && (ch = fallbackBuffer->InternalGetNextChar()) != 0)
goto ProcessChar;
Contract::Assert(pTarget <= pAllocatedBufferEnd, "[UTF8Encoding.GetBytes]pTarget <= pAllocatedBufferEnd");
-#endif // FASTLOOP
// no pending char at this point
ch = 0;
}
#endif
-#ifdef FASTLOOP
// If still have fallback don't do fast loop
if (fallbackBuffer != nullptr && (ch = fallbackBuffer->InternalGetNextChar()) != 0)
{
// byteCount - the last byte is already included
}
-#endif // FASTLOOP
// no pending char at this point
ch = 0;