mirror of
https://github.com/dlang/phobos.git
synced 2025-05-03 08:30:33 +03:00
store other immutable tables in unicode_tables
- This is mainly for consistency with other tables.
This commit is contained in:
parent
45c873faf3
commit
f9e7a93d93
2 changed files with 15 additions and 18 deletions
File diff suppressed because one or more lines are too long
13
std/uni.d
13
std/uni.d
|
@ -5829,12 +5829,12 @@ public Grapheme decompose(UnicodeDecomposition decompType=Canonical)(dchar ch)
|
|||
{
|
||||
static if(decompType == Canonical)
|
||||
{
|
||||
static immutable table = decompCanonTable;
|
||||
alias table = decompCanonTable;
|
||||
static immutable mapping = asTrie(canonMappingTrieEntries);
|
||||
}
|
||||
else static if(decompType == Compatibility)
|
||||
{
|
||||
static immutable table = decompCompatTable;
|
||||
alias table = decompCompatTable;
|
||||
static immutable mapping = asTrie(compatMappingTrieEntries);
|
||||
}
|
||||
ushort idx = mapping[ch];
|
||||
|
@ -6352,8 +6352,7 @@ ushort toLowerIndex(dchar c)
|
|||
@trusted pure nothrow
|
||||
dchar toLowerTab(size_t idx)
|
||||
{
|
||||
static immutable tab = toLowerTable;
|
||||
return tab[idx];
|
||||
return toLowerTable[idx];
|
||||
}
|
||||
|
||||
// trusted -> avoid bounds check
|
||||
|
@ -6368,8 +6367,7 @@ ushort toTitleIndex(dchar c)
|
|||
@trusted pure nothrow
|
||||
dchar toTitleTab(size_t idx)
|
||||
{
|
||||
static immutable tab = toTitleTable;
|
||||
return tab[idx];
|
||||
return toTitleTable[idx];
|
||||
}
|
||||
|
||||
// trusted -> avoid bounds check
|
||||
|
@ -6384,8 +6382,7 @@ ushort toUpperIndex(dchar c)
|
|||
@trusted pure nothrow
|
||||
dchar toUpperTab(size_t idx)
|
||||
{
|
||||
static immutable tab = toUpperTable;
|
||||
return tab[idx];
|
||||
return toUpperTable[idx];
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue