julelang / jule

Effective programming language to build efficient, fast, reliable and safe software while maintaining simplicity
https://jule.dev
BSD 3-Clause "New" or "Revised" License
128 stars 13 forks source link

style: simplify logic in `utf16_decode(const std::vector<jule::U16> &)` #63

Closed vil02 closed 7 months ago

vil02 commented 7 months ago

Description

If r is such that the condition r < jule::UTF16_SURR1 || jule::UTF16_SURR3 <= r is false, then r >= jule::UTF16_SURR1 && jule::UTF16_SURR3 > r is true. Therefore jule::UTF16_SURR1 <= r is also true.

Checklist

Screenshots (if any)

Note to reviewers

Remove expression, which is always true.