Closed DaZombieKiller closed 2 years ago
Haha... You beat me by seconds. Was just committing to a branch with your changes! 😁
Merging #284 (1c6bd54) into main (fc97cb1) will decrease coverage by
0%
. The diff coverage is22%
.
@@ Coverage Diff @@
## main #284 +/- ##
=====================================
- Coverage 83% 83% -1%
=====================================
Files 222 222
Lines 12200 12199 -1
Branches 1756 1759 +3
=====================================
- Hits 10167 10159 -8
- Misses 1606 1610 +4
- Partials 427 430 +3
Flag | Coverage Δ | |
---|---|---|
unittests | 83% <22%> (-1%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/SixLabors.Fonts/Unicode/UnicodeTrie.cs | 88% <22%> (-12%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fc97cb1...1c6bd54. Read the comment docs.
Prerequisites
Description
This is a small PR making some changes to the recently-introduced
ReadOnlySpan<byte>
constructor forUnicodeTrie
. Currently, the data provided to this constructor is constant data generated via the RoslynROS<byte> = new byte[]
trick, which doesn't guarantee alignment on the data. The data is also stored in little-endian, which requires swapping for big-endian platforms.UnicodeTrieHeader
is now a simple structure containing only fields, and it no longer has aStructLayout
attribute. Its layout won't result in padding, soPack = 1
was removed.UnicodeTrie
constructor now readsUnicodeTrieHeader
withMemoryMarshal.Read
, to ensure there are no problems with alignment on platforms that require it (MemoryMarshal.Read
performs an unaligned read.)rawData
span is no longerCast
ed touint
but rather the destinationuint
array is casted tobyte
, for similar alignment-related reasons.