Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
remove Pool.opCmp
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Jan 18, 2015
1 parent eab6372 commit fe76d2a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -3094,7 +3094,7 @@ nothrow:
size_t i;
for (; i < npools; ++i)
{
if (pool.opCmp(pools[i]) < 0)
if (pool.baseAddr < pools[i].baseAddr)
break;
}
if (i != npools)
Expand Down Expand Up @@ -3140,7 +3140,7 @@ nothrow:
if (!npools) return;

foreach (i, pool; pools[0 .. npools - 1])
assert(pool.opCmp(pools[i + 1]) < 0);
assert(pool.baseAddr < pools[i + 1].baseAddr);
}

private:
Expand Down Expand Up @@ -3426,17 +3426,6 @@ struct Pool
}
return size;
}

/**
* Used for sorting pooltable[]
*/
int opCmp(const Pool *p2) const nothrow
{
if (baseAddr < p2.baseAddr)
return -1;
else
return cast(int)(baseAddr > p2.baseAddr);
}
}


Expand Down

0 comments on commit fe76d2a

Please sign in to comment.