mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 07:55:42 +00:00
Enum tokens are now sorted
This only affects the in-memory representation - sorted tokens are easier to debug.
This commit is contained in:
parent
827fe0788a
commit
39b1f84fc8
|
@ -195,15 +195,17 @@ namespace Bind
|
||||||
{
|
{
|
||||||
foreach (var e in enums.Values)
|
foreach (var e in enums.Values)
|
||||||
{
|
{
|
||||||
var processed_constants = new Dictionary<string, Constant>(e.ConstantCollection.Count);
|
var processed_constants = new SortedDictionary<string, Constant>();
|
||||||
foreach (Constant c in e.ConstantCollection.Values)
|
foreach (Constant c in e.ConstantCollection.Values)
|
||||||
{
|
{
|
||||||
c.Name = TranslateConstantName(c.Name, false);
|
c.Name = TranslateConstantName(c.Name, false);
|
||||||
c.Value = TranslateConstantValue(c.Value);
|
c.Value = TranslateConstantValue(c.Value);
|
||||||
c.Reference = TranslateEnumName(c.Reference);
|
c.Reference = TranslateEnumName(c.Reference);
|
||||||
if (!processed_constants.ContainsKey(c.Name))
|
if (!processed_constants.ContainsKey(c.Name))
|
||||||
|
{
|
||||||
processed_constants.Add(c.Name, c);
|
processed_constants.Add(c.Name, c);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
e.ConstantCollection = processed_constants;
|
e.ConstantCollection = processed_constants;
|
||||||
|
|
||||||
var enum_override = nav.SelectSingleNode(GetOverridesPath(apiname, e.Name));
|
var enum_override = nav.SelectSingleNode(GetOverridesPath(apiname, e.Name));
|
||||||
|
|
Loading…
Reference in a new issue