We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 003c17a commit 5291c6cCopy full SHA for 5291c6c
projects/client/RabbitMQ.Client/src/util/IntAllocator.cs
@@ -62,7 +62,7 @@ public class IntAllocator{
62
* A class representing a list of inclusive intervals
63
*/
64
public class IntervalList{
65
- public IntervalList(int start, int end){
+ public IntervalList(int start, int end) {
66
this.Start = start;
67
this.End = end;
68
}
@@ -154,8 +154,9 @@ public int Allocate()
154
if(unsortedCount > 0){
155
return unsorted[--unsortedCount];
156
} else if (Base != null) {
157
- int result = Base.Start++;
158
- if(Base.Start > Base.End) Base = Base.Next;
+ int result = Base.Start;
+ if (Base.Start == Base.End) Base = Base.Next;
159
+ else Base.Start++;
160
return result;
161
} else {
162
return -1;
0 commit comments