Skip to content

Commit d6016ab

Browse files
committed
Update sorting.d
1 parent 4499e81 commit d6016ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/mir/ndslice/sorting.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ template sort(alias less = "a < b")
173173
if (packs.length == 1)
174174
{
175175
import mir.ndslice.topology: flattened;
176+
if (slice.anyEmpty)
177+
return;
176178
slice.flattened.quickSortImpl!less;
177179
return slice;
178180
}

0 commit comments

Comments
 (0)