Merge pull request #22 from AkiraMiyakoda/fix-msvc2019-warning

Fix MSVC 2017-2019 warning about negative unsigned value.
This commit is contained in:
nemtrif 2019-03-27 18:12:51 -04:00 committed by GitHub
commit f637e70c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,8 +49,8 @@ namespace internal
const uint16_t LEAD_SURROGATE_MAX = 0xdbffu;
const uint16_t TRAIL_SURROGATE_MIN = 0xdc00u;
const uint16_t TRAIL_SURROGATE_MAX = 0xdfffu;
const uint16_t LEAD_OFFSET = LEAD_SURROGATE_MIN - (0x10000 >> 10);
const uint32_t SURROGATE_OFFSET = 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN;
const uint16_t LEAD_OFFSET = 0xd7c0u; // LEAD_SURROGATE_MIN - (0x10000 >> 10)
const uint32_t SURROGATE_OFFSET = 0xfca02400u; // 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN
// Maximum valid value for a Unicode code point
const uint32_t CODE_POINT_MAX = 0x0010ffffu;