More implicit array to bool

This commit is contained in:
Daniel Murphy 2013-12-15 19:55:34 +11:00
parent 42c151df49
commit 1818d190b5
6 changed files with 14 additions and 11 deletions

View file

@ -1955,7 +1955,7 @@ void replaceInPlace(T, Range)(ref T[] array, size_t from, size_t to, Range stuff
!is(T == const T) &&
!is(T == immutable T))
{
if (overlap(array, stuff))
if (overlap(array, stuff).length)
{
// use slower/conservative method
array = array[0 .. from] ~ stuff ~ array[to .. $];