mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Update utfcpp.
This commit is contained in:
parent
9e3090ab1d
commit
16f2c1bde4
2
vendor/README.md
vendored
2
vendor/README.md
vendored
@ -68,6 +68,6 @@ This directory contains vendored dependencies that are shipped with InspIRCd to
|
|||||||
|
|
||||||
**License** — Boost Software License
|
**License** — Boost Software License
|
||||||
|
|
||||||
**Version** — v4.0.5
|
**Version** — v4.0.6
|
||||||
|
|
||||||
**Website** — [https://github.com/nemtrif/utfcpp](https://github.com/nemtrif/utfcpp)
|
**Website** — [https://github.com/nemtrif/utfcpp](https://github.com/nemtrif/utfcpp)
|
||||||
|
8
vendor/utfcpp/core.h
vendored
8
vendor/utfcpp/core.h
vendored
@ -215,7 +215,7 @@ namespace internal
|
|||||||
|
|
||||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||||
|
|
||||||
code_point += (*it) & 0x3f;
|
code_point = static_cast<utfchar32_t>(code_point + ((*it) & 0x3f));
|
||||||
|
|
||||||
return UTF8_OK;
|
return UTF8_OK;
|
||||||
}
|
}
|
||||||
@ -234,11 +234,11 @@ namespace internal
|
|||||||
|
|
||||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||||
|
|
||||||
code_point += (utf8::internal::mask8(*it) << 6) & 0xfff;
|
code_point = static_cast<utfchar32_t>(code_point + ((utf8::internal::mask8(*it) << 6) & 0xfff));
|
||||||
|
|
||||||
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end)
|
||||||
|
|
||||||
code_point += (*it) & 0x3f;
|
code_point = static_cast<utfchar32_t>(code_point + ((*it) & 0x3f));
|
||||||
|
|
||||||
return UTF8_OK;
|
return UTF8_OK;
|
||||||
}
|
}
|
||||||
@ -327,7 +327,7 @@ namespace internal
|
|||||||
else if (is_lead_surrogate(first_word)) {
|
else if (is_lead_surrogate(first_word)) {
|
||||||
const utfchar16_t second_word = *it++;
|
const utfchar16_t second_word = *it++;
|
||||||
if (is_trail_surrogate(second_word)) {
|
if (is_trail_surrogate(second_word)) {
|
||||||
code_point = (first_word << 10) + second_word + SURROGATE_OFFSET;
|
code_point = static_cast<utfchar32_t>(first_word << 10) + second_word + SURROGATE_OFFSET;
|
||||||
return UTF8_OK;
|
return UTF8_OK;
|
||||||
} else
|
} else
|
||||||
err = INCOMPLETE_SEQUENCE;
|
err = INCOMPLETE_SEQUENCE;
|
||||||
|
6
vendor/utfcpp/unchecked.h
vendored
6
vendor/utfcpp/unchecked.h
vendored
@ -115,15 +115,15 @@ namespace utf8
|
|||||||
++it;
|
++it;
|
||||||
cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);
|
cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff);
|
||||||
++it;
|
++it;
|
||||||
cp += (*it) & 0x3f;
|
cp = static_cast<utfchar32_t>(cp + ((*it) & 0x3f));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
++it;
|
++it;
|
||||||
cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
|
cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff);
|
||||||
++it;
|
++it;
|
||||||
cp += (utf8::internal::mask8(*it) << 6) & 0xfff;
|
cp = static_cast<utfchar32_t>(cp + ((utf8::internal::mask8(*it) << 6) & 0xfff));
|
||||||
++it;
|
++it;
|
||||||
cp += (*it) & 0x3f;
|
cp = static_cast<utfchar32_t>(cp + ((*it) & 0x3f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user