Skip to content

Commit

Permalink
Fix for compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
goerch authored Sep 29, 2023
1 parent 9cfb714 commit 607e3bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static const std::vector<std::pair<uint32_t, uint32_t>> control_ranges = {

static std::string codepoint_to_utf8(uint32_t cp) {
std::string result;
if (0x00 <= cp && cp <= 0x7f) {
if (/* 0x00 <= cp && */ cp <= 0x7f) {
result.push_back(cp);
}
else if (0x80 <= cp && cp <= 0x7ff) {
Expand Down Expand Up @@ -300,7 +300,7 @@ static std::vector<uint32_t> codepoints_from_utf8(const std::string& utf8) {

static std::vector<uint16_t> codepoint_to_utf16(uint32_t cp) {
std::vector<uint16_t> result;
if (0x0000 <= cp && cp <= 0xffff) {
if (/* 0x0000 <= cp && */ cp <= 0xffff) {
result.emplace_back(cp);
}
else if (0x10000 <= cp && cp <= 0x10ffff) {
Expand Down

0 comments on commit 607e3bf

Please sign in to comment.