However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.
Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
63c09bbf88cc6524ea8478fdea430ba45275a933
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
goto FalseExit;
answer = c - '0';
- for (; ; )
+ while (true)
{
index++;
if ((uint)index >= (uint)source.Length)
// If we got here, the very first character not consumed was a whitespace. We can skip past any consecutive whitespace, then continue decoding.
int indexOfFirstNonSpace = 1;
- for (; ; )
+ while (true)
{
if (indexOfFirstNonSpace == chars.Length)
break;
log.DebugFacilityMessage("OnStopEnterActivityState", ActivityInfo.LiveActivities(m_current.Value));
}
- for (; ; ) // This is a retry loop.
+ while (true) // This is a retry loop.
{
ActivityInfo? currentActivity = m_current.Value;
ActivityInfo? newCurrentActivity = null; // if we have seen any live activities (orphans), at he first one we have seen.
#if (PLATFORM_WINDOWS && (ES_SESSION_INFO || !ES_BUILD_STANDALONE))
int buffSize = 256; // An initial guess that probably works most of the time.
byte* buffer;
- for (; ; )
+ while (true)
{
byte* space = stackalloc byte[buffSize];
buffer = space;
fixed (char* pFormat = &MemoryMarshal.GetReference(format))
{
src = 0;
- for (; ; )
+ while (true)
{
if (src >= format.Length)
{
int valueTailLength = valueLength - 1;
int offset = 0;
- for (; ; )
+ while (true)
{
Debug.Assert(0 <= offset && offset <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
int remainingSearchSpaceLength = searchSpaceLength - offset - valueTailLength;
int valueTailLength = valueLength - 1;
int index = 0;
- for (; ; )
+ while (true)
{
Debug.Assert(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
int remainingSearchSpaceLength = searchSpaceLength - index - valueTailLength;
int valueTailLength = valueLength - 1;
int index = 0;
- for (; ; )
+ while (true)
{
Debug.Assert(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
int remainingSearchSpaceLength = searchSpaceLength - index - valueTailLength;