Skip to content

Commit

Permalink
pass improved value range propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jun 27, 2011
1 parent bb53c94 commit 5c7d8be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/container.d
Expand Up @@ -2330,8 +2330,8 @@ version(unittest)
uint* pDestructionMask;
~this()
{
if (pDestructionMask)
*pDestructionMask += 1 << order;
if (pDestructionMask)
*pDestructionMask += 1 << order;
}
}
}
Expand Down Expand Up @@ -3082,7 +3082,7 @@ struct Array(T) if (is(T == bool))
@property bool back()
{
enforce(!empty);
return data.back & (1u << ((_store._length - 1) % bitsPerWord));
return cast(bool)(data.back & (1u << ((_store._length - 1) % bitsPerWord)));
}

/// Ditto
Expand Down Expand Up @@ -3117,7 +3117,7 @@ struct Array(T) if (is(T == bool))
auto div = cast(size_t) (i / bitsPerWord);
auto rem = i % bitsPerWord;
enforce(div < data.length);
return data.ptr[div] & (1u << rem);
return cast(bool)(data.ptr[div] & (1u << rem));
}
/// ditto
void opIndexAssign(bool value, ulong i)
Expand Down

0 comments on commit 5c7d8be

Please sign in to comment.