Skip to content

Commit

Permalink
fix foreach int index deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Mar 8, 2019
1 parent 0678c5d commit fe9dd23
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/openmethods.d
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ struct Runtime
struct Param
{
Method* method;
int param;
size_t param;

auto toString() const
{
Expand Down Expand Up @@ -1021,7 +1021,7 @@ struct Runtime
auto m = new Method(mi);
methods ~= m;

foreach (int i, ci; mi.vp) {
foreach (size_t i, ci; mi.vp) {
auto c = upgrade(ci);
m.vp ~= c;
c.methodParams ~= Runtime.Param(m, i);
Expand Down Expand Up @@ -1447,7 +1447,7 @@ struct Runtime
auto dims = m.vp.length;
m.groups.length = dims;

foreach (int dim, vp; m.vp) {
foreach (size_t dim, vp; m.vp) {
debug(explain) {
writefln(" make groups for param #%s, class %s", dim, vp.name);
}
Expand All @@ -1461,7 +1461,7 @@ struct Runtime
BitArray mask;
mask.length = m.specs.length;

foreach (int specIndex, spec; m.specs) {
foreach (size_t specIndex, spec; m.specs) {
if (conforming in spec.params[dim].conforming) {
debug(explain) {
writefln(" %s", *spec);
Expand Down Expand Up @@ -1492,7 +1492,7 @@ struct Runtime
int stride = 1;
m.strides.length = dims - 1;

foreach (int dim, vp; m.vp[1..$]) {
foreach (size_t dim, vp; m.vp[1..$]) {
debug(explain) {
writefln(" stride for dim %s = %s", dim + 1, stride);
}
Expand All @@ -1513,7 +1513,7 @@ struct Runtime
writefln(" assign slots");
}

foreach (int dim, vp; m.vp) {
foreach (size_t dim, vp; m.vp) {
debug(explain) {
writefln(" dim %s", dim);
}
Expand Down Expand Up @@ -1667,7 +1667,7 @@ struct Runtime
*m, m.vp.length, slot);
}

foreach (int dim, vp; m.vp) {
foreach (size_t dim, vp; m.vp) {
debug(explain) {
writefln(" dim %s", dim);
}
Expand Down

0 comments on commit fe9dd23

Please sign in to comment.