mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Minor optimization
Similar to the index hack done for array shuffling modulo 24 & 1f.
This commit is contained in:
parent
758b6e6770
commit
6754645a5f
1 changed files with 3 additions and 2 deletions
|
@ -120,8 +120,6 @@ namespace PKHeX.Core
|
||||||
private static char GetG3Char(byte chr, bool jp)
|
private static char GetG3Char(byte chr, bool jp)
|
||||||
{
|
{
|
||||||
var table = jp ? G3_JP : G3_EN;
|
var table = jp ? G3_JP : G3_EN;
|
||||||
if (chr >= table.Length)
|
|
||||||
return Terminator;
|
|
||||||
return table[chr];
|
return table[chr];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +158,9 @@ namespace PKHeX.Core
|
||||||
'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', // D
|
'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', // D
|
||||||
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', // E
|
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', // E
|
||||||
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
||||||
|
|
||||||
|
// Make the total length 256 so that any byte access is always within the array
|
||||||
|
Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator, Terminator
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly char[] G3_JP =
|
private static readonly char[] G3_JP =
|
||||||
|
|
Loading…
Reference in a new issue