blob: 38a898963b097408f5abe25c8ea633bdc81c6e28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
using System;
namespace XMainClient
{
internal class XLFUItem<T> : IComparable<XLFUItem<T>>
{
public bool bCanPop
{
get
{
return this.canPop < 0;
}
set
{
this.canPop = (value ? -1 : 1);
}
}
public T data;
public uint frequent = 0u;
public int index;
private int canPop;
public int CompareTo(XLFUItem<T> other)
{
bool flag = this.canPop == other.canPop;
int result;
if (flag)
{
result = this.frequent.CompareTo(other.frequent);
}
else
{
result = this.canPop.CompareTo(other.canPop);
}
return result;
}
}
}
|