Skip to content

Commit fa02fd0

Browse files
committed
fix IotaIterator
1 parent 95fe143 commit fa02fd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/mir/ndslice/iterator.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ struct IotaIterator(I)
137137
}
138138

139139
ptrdiff_t opBinary(string op : "-")(const typeof(this) right) scope const
140-
{ return this._index - right._index; }
140+
{ return cast(ptrdiff_t)(this._index - right._index); }
141141

142142
bool opEquals()(const typeof(this) right) scope const
143143
{ return this._index == right._index; }
144144

145-
ptrdiff_t opCmp()(const typeof(this) right) scope const
145+
auto opCmp()(const typeof(this) right) scope const
146146
{ return this._index - right._index; }
147147
}
148148

0 commit comments

Comments
 (0)