mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
fix implicit casting
This commit is contained in:
parent
7ef9d6f2b8
commit
2b49121d3f
1 changed files with 2 additions and 2 deletions
|
@ -1012,7 +1012,7 @@ template EncoderInstance(CharType : char)
|
|||
|
||||
dchar decodeViaRead()()
|
||||
{
|
||||
auto c = read;
|
||||
dchar c = read;
|
||||
if (c < 0xC0) return c;
|
||||
int n = tails(cast(char) c);
|
||||
c &= (1 << (6 - n)) - 1;
|
||||
|
@ -1027,7 +1027,7 @@ template EncoderInstance(CharType : char)
|
|||
{
|
||||
dchar c = read;
|
||||
if (c < 0x80) return c;
|
||||
int n = tails(c);
|
||||
int n = tails(cast(char) c);
|
||||
if (n == 0) return INVALID_SEQUENCE;
|
||||
|
||||
if (!canRead) return INVALID_SEQUENCE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue