We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed56ecf commit 6172b22Copy full SHA for 6172b22
unicode.h
@@ -404,7 +404,8 @@ static std::unordered_map<uint32_t, int> codepoint_type_map() {
404
405
static int codepoint_type(uint32_t cp) {
406
static std::unordered_map<uint32_t, int> codepoint_types = codepoint_type_map();
407
- return codepoint_types.find(cp) == codepoint_types.end() ? CODEPOINT_TYPE_UNIDENTIFIED : codepoint_types.at(cp);
+ const auto it = codepoint_types.find(cp);
408
+ return it == codepoint_types.end() ? CODEPOINT_TYPE_UNIDENTIFIED : it->second;
409
}
410
411
static int codepoint_type(const std::string & utf8) {
0 commit comments