ronantakizawa/codereview-bench huggingface dataset:
Repository: godotengine/godot
File: core/string/char_utils.h (C/C++)

Code before:
	int middle = (low + high) / 2; \
\
	while (low <= high) { \
		if (p_char < m_array[middle].start) { \
			high = middle - 1; \
		} else if (p_char > m_array[middle].end) { \
			low = middle + 1; \
		} else { \
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}

constexpr bool is_digit(char32_t p_char) {
	return (p_char >= '0' && p_char <= '9');
}

constexpr bool is_hex_digit(char32_t p_char) {

Review comment (suggestion):
```suggestion
	BSEARCH_CHAR_RANGE(uppercase_letter, uppercase_letter_size);
```

Code after:
extern const int unicode_letter_size;

#define BSEARCH_CHAR_RANGE(m_array, m_size) \
	int low = 0; \
	int high = m_size - 1; \
	int middle = (low + high) / 2; \
\
	while (low <= high) { \
		if (p_char < m_array[middle].start) { \
			high = middle - 1; \
		} else if (p_char > m_array[middle].end) { \
			low = middle + 1; \
		} else { \
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start, xid_start_size);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue, xid_continue_size);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter, uppercase_letter_size);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter, lowercase_letter_size);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter, unicode_letter_size);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}
Repository: godotengine/godot
File: core/string/char_utils.h (C/C++)

Code before:
			high = middle - 1; \
		} else if (p_char > m_array[middle].end) { \
			low = middle + 1; \
		} else { \
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}

constexpr bool is_digit(char32_t p_char) {
	return (p_char >= '0' && p_char <= '9');
}

constexpr bool is_hex_digit(char32_t p_char) {
	return (is_digit(p_char) || (p_char >= 'a' && p_char <= 'f') || (p_char >= 'A' && p_char <= 'F'));
}

constexpr bool is_binary_digit(char32_t p_char) {

Review comment (suggestion):
```suggestion
	BSEARCH_CHAR_RANGE(lowercase_letter, lowercase_letter_size);
```

Code after:
	int high = m_size - 1; \
	int middle = (low + high) / 2; \
\
	while (low <= high) { \
		if (p_char < m_array[middle].start) { \
			high = middle - 1; \
		} else if (p_char > m_array[middle].end) { \
			low = middle + 1; \
		} else { \
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start, xid_start_size);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue, xid_continue_size);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter, uppercase_letter_size);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter, lowercase_letter_size);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter, unicode_letter_size);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}

constexpr bool is_digit(char32_t p_char) {
	return (p_char >= '0' && p_char <= '9');
}
Repository: godotengine/godot
File: core/string/char_utils.h (C/C++)

Code before:
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}

constexpr bool is_digit(char32_t p_char) {
	return (p_char >= '0' && p_char <= '9');
}

constexpr bool is_hex_digit(char32_t p_char) {
	return (is_digit(p_char) || (p_char >= 'a' && p_char <= 'f') || (p_char >= 'A' && p_char <= 'F'));
}

constexpr bool is_binary_digit(char32_t p_char) {
	return (p_char == '0' || p_char == '1');
}

constexpr bool is_ascii_alphabet_char(char32_t p_char) {

Review comment (suggestion):
```suggestion
	BSEARCH_CHAR_RANGE(unicode_letter, unicode_letter_size);
```

Code after:
		if (p_char < m_array[middle].start) { \
			high = middle - 1; \
		} else if (p_char > m_array[middle].end) { \
			low = middle + 1; \
		} else { \
			return true; \
		} \
\
		middle = (low + high) / 2; \
	} \
\
	return false

inline bool is_unicode_identifier_start(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_start, xid_start_size);
}

inline bool is_unicode_identifier_continue(char32_t p_char) {
	BSEARCH_CHAR_RANGE(xid_continue, xid_continue_size);
}

inline bool is_unicode_upper_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(uppercase_letter, uppercase_letter_size);
}

inline bool is_unicode_lower_case(char32_t p_char) {
	BSEARCH_CHAR_RANGE(lowercase_letter, lowercase_letter_size);
}

inline bool is_unicode_letter(char32_t p_char) {
	BSEARCH_CHAR_RANGE(unicode_letter, unicode_letter_size);
}

#undef BSEARCH_CHAR_RANGE

constexpr bool is_ascii_upper_case(char32_t p_char) {
	return (p_char >= 'A' && p_char <= 'Z');
}

constexpr bool is_ascii_lower_case(char32_t p_char) {
	return (p_char >= 'a' && p_char <= 'z');
}

constexpr bool is_digit(char32_t p_char) {
	return (p_char >= '0' && p_char <= '9');
}

constexpr bool is_hex_digit(char32_t p_char) {
	return (is_digit(p_char) || (p_char >= 'a' && p_char <= 'f') || (p_char >= 'A' && p_char <= 'F'));
}
Repository: godotengine/godot
File: core/string/char_range.cpp (C++)

Code before:
	{ 0x1ee5b, 0x1ee5b },
	{ 0x1ee5d, 0x1ee5d },
	{ 0x1ee5f, 0x1ee5f },
	{ 0x1ee61, 0x1ee62 },
	{ 0x1ee64, 0x1ee64 },
	{ 0x1ee67, 0x1ee6a },
	{ 0x1ee6c, 0x1ee72 },
	{ 0x1ee74, 0x1ee77 },
	{ 0x1ee79, 0x1ee7c },
	{ 0x1ee7e, 0x1ee7e },
	{ 0x1ee80, 0x1ee89 },
	{ 0x1ee8b, 0x1ee9b },
	{ 0x1eea1, 0x1eea3 },
	{ 0x1eea5, 0x1eea9 },
	{ 0x1eeab, 0x1eebb },
	{ 0x20000, 0x2a6df },
	{ 0x2a700, 0x2b81d },
	{ 0x2b820, 0x2cead },
	{ 0x2ceb0, 0x2ebe0 },
	{ 0x2ebf0, 0x2ee5d },
	{ 0x2f800, 0x2fa1d },
	{ 0x30000, 0x3134a },
	{ 0x31350, 0x33479 },
};

CharRange xid_continue[806] = {
	{ 0x30, 0x39 },
	{ 0x41, 0x5a },
	{ 0x5f, 0x5f },
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xb7, 0xb7 },
	{ 0xba, 0xba },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xf6 },
	{ 0xf8, 0x2c1 },
	{ 0x2c6, 0x2d1 },
	{ 0x2e0, 0x2e4 },
	{ 0x2ec, 0x2ec },
	{ 0x2ee, 0x2ee },
	{ 0x300, 0x374 },
	{ 0x376, 0x377 },
	{ 0x37b, 0x37d },
	{ 0x37f, 0x37f },
	{ 0x386, 0x38a },
	{ 0x38c, 0x38c },
	{ 0x38e, 0x3a1 },
	{ 0x3a3, 0x3f5 },
	{ 0x3f7, 0x481 },
	{ 0x483, 0x487 },

Review comment (suggestion):
```suggestion
const int xid_continue_size = 806;
const CharRange xid_continue[xid_continue_size] = {
```

Code after:
	{ 0x1ee59, 0x1ee59 },
	{ 0x1ee5b, 0x1ee5b },
	{ 0x1ee5d, 0x1ee5d },
	{ 0x1ee5f, 0x1ee5f },
	{ 0x1ee61, 0x1ee62 },
	{ 0x1ee64, 0x1ee64 },
	{ 0x1ee67, 0x1ee6a },
	{ 0x1ee6c, 0x1ee72 },
	{ 0x1ee74, 0x1ee77 },
	{ 0x1ee79, 0x1ee7c },
	{ 0x1ee7e, 0x1ee7e },
	{ 0x1ee80, 0x1ee89 },
	{ 0x1ee8b, 0x1ee9b },
	{ 0x1eea1, 0x1eea3 },
	{ 0x1eea5, 0x1eea9 },
	{ 0x1eeab, 0x1eebb },
	{ 0x20000, 0x2a6df },
	{ 0x2a700, 0x2b81d },
	{ 0x2b820, 0x2cead },
	{ 0x2ceb0, 0x2ebe0 },
	{ 0x2ebf0, 0x2ee5d },
	{ 0x2f800, 0x2fa1d },
	{ 0x30000, 0x3134a },
	{ 0x31350, 0x33479 },
};

const int xid_continue_size = 806;
const CharRange xid_continue[xid_continue_size] = {
	{ 0x30, 0x39 },
	{ 0x41, 0x5a },
	{ 0x5f, 0x5f },
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xb7, 0xb7 },
	{ 0xba, 0xba },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xf6 },
	{ 0xf8, 0x2c1 },
	{ 0x2c6, 0x2d1 },
	{ 0x2e0, 0x2e4 },
	{ 0x2ec, 0x2ec },
	{ 0x2ee, 0x2ee },
	{ 0x300, 0x374 },
	{ 0x376, 0x377 },
	{ 0x37b, 0x37d },
	{ 0x37f, 0x37f },
	{ 0x386, 0x38a },
	{ 0x38c, 0x38c },
	{ 0x38e, 0x3a1 },
	{ 0x3a3, 0x3f5 },
Repository: godotengine/godot
File: core/string/char_range.cpp (C++)

Code before:
	{ 0x1ee5f, 0x1ee5f },
	{ 0x1ee61, 0x1ee62 },
	{ 0x1ee64, 0x1ee64 },
	{ 0x1ee67, 0x1ee6a },
	{ 0x1ee6c, 0x1ee72 },
	{ 0x1ee74, 0x1ee77 },
	{ 0x1ee79, 0x1ee7c },
	{ 0x1ee7e, 0x1ee7e },
	{ 0x1ee80, 0x1ee89 },
	{ 0x1ee8b, 0x1ee9b },
	{ 0x1eea1, 0x1eea3 },
	{ 0x1eea5, 0x1eea9 },
	{ 0x1eeab, 0x1eebb },
	{ 0x1fbf0, 0x1fbf9 },
	{ 0x20000, 0x2a6df },
	{ 0x2a700, 0x2b81d },
	{ 0x2b820, 0x2cead },
	{ 0x2ceb0, 0x2ebe0 },
	{ 0x2ebf0, 0x2ee5d },
	{ 0x2f800, 0x2fa1d },
	{ 0x30000, 0x3134a },
	{ 0x31350, 0x33479 },
	{ 0xe0100, 0xe01ef },
};

CharRange uppercase_letter[660] = {
	{ 0x41, 0x5a },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xde },
	{ 0x100, 0x100 },
	{ 0x102, 0x102 },
	{ 0x104, 0x104 },
	{ 0x106, 0x106 },
	{ 0x108, 0x108 },
	{ 0x10a, 0x10a },
	{ 0x10c, 0x10c },
	{ 0x10e, 0x10e },
	{ 0x110, 0x110 },
	{ 0x112, 0x112 },
	{ 0x114, 0x114 },
	{ 0x116, 0x116 },
	{ 0x118, 0x118 },
	{ 0x11a, 0x11a },
	{ 0x11c, 0x11c },
	{ 0x11e, 0x11e },
	{ 0x120, 0x120 },
	{ 0x122, 0x122 },
	{ 0x124, 0x124 },
	{ 0x126, 0x126 },
	{ 0x128, 0x128 },
	{ 0x12a, 0x12a },

Review comment (suggestion):
```suggestion
const int uppercase_letter_size = 660;
const CharRange uppercase_letter[uppercase_letter_size] = {
```

Code after:
	{ 0x1ee5b, 0x1ee5b },
	{ 0x1ee5d, 0x1ee5d },
	{ 0x1ee5f, 0x1ee5f },
	{ 0x1ee61, 0x1ee62 },
	{ 0x1ee64, 0x1ee64 },
	{ 0x1ee67, 0x1ee6a },
	{ 0x1ee6c, 0x1ee72 },
	{ 0x1ee74, 0x1ee77 },
	{ 0x1ee79, 0x1ee7c },
	{ 0x1ee7e, 0x1ee7e },
	{ 0x1ee80, 0x1ee89 },
	{ 0x1ee8b, 0x1ee9b },
	{ 0x1eea1, 0x1eea3 },
	{ 0x1eea5, 0x1eea9 },
	{ 0x1eeab, 0x1eebb },
	{ 0x1fbf0, 0x1fbf9 },
	{ 0x20000, 0x2a6df },
	{ 0x2a700, 0x2b81d },
	{ 0x2b820, 0x2cead },
	{ 0x2ceb0, 0x2ebe0 },
	{ 0x2ebf0, 0x2ee5d },
	{ 0x2f800, 0x2fa1d },
	{ 0x30000, 0x3134a },
	{ 0x31350, 0x33479 },
	{ 0xe0100, 0xe01ef },
};

const int uppercase_letter_size = 660;
const CharRange uppercase_letter[uppercase_letter_size] = {
	{ 0x41, 0x5a },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xde },
	{ 0x100, 0x100 },
	{ 0x102, 0x102 },
	{ 0x104, 0x104 },
	{ 0x106, 0x106 },
	{ 0x108, 0x108 },
	{ 0x10a, 0x10a },
	{ 0x10c, 0x10c },
	{ 0x10e, 0x10e },
	{ 0x110, 0x110 },
	{ 0x112, 0x112 },
	{ 0x114, 0x114 },
	{ 0x116, 0x116 },
	{ 0x118, 0x118 },
	{ 0x11a, 0x11a },
	{ 0x11c, 0x11c },
	{ 0x11e, 0x11e },
	{ 0x120, 0x120 },
	{ 0x122, 0x122 },
	{ 0x124, 0x124 },
Repository: godotengine/godot
File: core/string/char_range.cpp (C++)

Code before:
	{ 0x1d50d, 0x1d514 },
	{ 0x1d516, 0x1d51c },
	{ 0x1d538, 0x1d539 },
	{ 0x1d53b, 0x1d53e },
	{ 0x1d540, 0x1d544 },
	{ 0x1d546, 0x1d546 },
	{ 0x1d54a, 0x1d550 },
	{ 0x1d56c, 0x1d585 },
	{ 0x1d5a0, 0x1d5b9 },
	{ 0x1d5d4, 0x1d5ed },
	{ 0x1d608, 0x1d621 },
	{ 0x1d63c, 0x1d655 },
	{ 0x1d670, 0x1d689 },
	{ 0x1d6a8, 0x1d6c0 },
	{ 0x1d6e2, 0x1d6fa },
	{ 0x1d71c, 0x1d734 },
	{ 0x1d756, 0x1d76e },
	{ 0x1d790, 0x1d7a8 },
	{ 0x1d7ca, 0x1d7ca },
	{ 0x1e900, 0x1e921 },
	{ 0x1f130, 0x1f149 },
	{ 0x1f150, 0x1f169 },
	{ 0x1f170, 0x1f189 },
};

CharRange lowercase_letter[677] = {
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xba, 0xba },
	{ 0xdf, 0xf6 },
	{ 0xf8, 0xff },
	{ 0x101, 0x101 },
	{ 0x103, 0x103 },
	{ 0x105, 0x105 },
	{ 0x107, 0x107 },
	{ 0x109, 0x109 },
	{ 0x10b, 0x10b },
	{ 0x10d, 0x10d },
	{ 0x10f, 0x10f },
	{ 0x111, 0x111 },
	{ 0x113, 0x113 },
	{ 0x115, 0x115 },
	{ 0x117, 0x117 },
	{ 0x119, 0x119 },
	{ 0x11b, 0x11b },
	{ 0x11d, 0x11d },
	{ 0x11f, 0x11f },
	{ 0x121, 0x121 },
	{ 0x123, 0x123 },
	{ 0x125, 0x125 },

Review comment (suggestion):
```suggestion
const int lowercase_letter_size = 677;
const CharRange lowercase_letter[lowercase_letter_size] = {
```

Code after:
	{ 0x1d4d0, 0x1d4e9 },
	{ 0x1d504, 0x1d505 },
	{ 0x1d507, 0x1d50a },
	{ 0x1d50d, 0x1d514 },
	{ 0x1d516, 0x1d51c },
	{ 0x1d538, 0x1d539 },
	{ 0x1d53b, 0x1d53e },
	{ 0x1d540, 0x1d544 },
	{ 0x1d546, 0x1d546 },
	{ 0x1d54a, 0x1d550 },
	{ 0x1d56c, 0x1d585 },
	{ 0x1d5a0, 0x1d5b9 },
	{ 0x1d5d4, 0x1d5ed },
	{ 0x1d608, 0x1d621 },
	{ 0x1d63c, 0x1d655 },
	{ 0x1d670, 0x1d689 },
	{ 0x1d6a8, 0x1d6c0 },
	{ 0x1d6e2, 0x1d6fa },
	{ 0x1d71c, 0x1d734 },
	{ 0x1d756, 0x1d76e },
	{ 0x1d790, 0x1d7a8 },
	{ 0x1d7ca, 0x1d7ca },
	{ 0x1e900, 0x1e921 },
	{ 0x1f130, 0x1f149 },
	{ 0x1f150, 0x1f169 },
	{ 0x1f170, 0x1f189 },
};

const int lowercase_letter_size = 677;
const CharRange lowercase_letter[lowercase_letter_size] = {
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xba, 0xba },
	{ 0xdf, 0xf6 },
	{ 0xf8, 0xff },
	{ 0x101, 0x101 },
	{ 0x103, 0x103 },
	{ 0x105, 0x105 },
	{ 0x107, 0x107 },
	{ 0x109, 0x109 },
	{ 0x10b, 0x10b },
	{ 0x10d, 0x10d },
	{ 0x10f, 0x10f },
	{ 0x111, 0x111 },
	{ 0x113, 0x113 },
	{ 0x115, 0x115 },
	{ 0x117, 0x117 },
	{ 0x119, 0x119 },
	{ 0x11b, 0x11b },
	{ 0x11d, 0x11d },
Repository: godotengine/godot
File: core/string/char_range.cpp (C++)

Code before:
	{ 0x1d552, 0x1d56b },
	{ 0x1d586, 0x1d59f },
	{ 0x1d5ba, 0x1d5d3 },
	{ 0x1d5ee, 0x1d607 },
	{ 0x1d622, 0x1d63b },
	{ 0x1d656, 0x1d66f },
	{ 0x1d68a, 0x1d6a5 },
	{ 0x1d6c2, 0x1d6da },
	{ 0x1d6dc, 0x1d6e1 },
	{ 0x1d6fc, 0x1d714 },
	{ 0x1d716, 0x1d71b },
	{ 0x1d736, 0x1d74e },
	{ 0x1d750, 0x1d755 },
	{ 0x1d770, 0x1d788 },
	{ 0x1d78a, 0x1d78f },
	{ 0x1d7aa, 0x1d7c2 },
	{ 0x1d7c4, 0x1d7c9 },
	{ 0x1d7cb, 0x1d7cb },
	{ 0x1df00, 0x1df09 },
	{ 0x1df0b, 0x1df1e },
	{ 0x1df25, 0x1df2a },
	{ 0x1e030, 0x1e06d },
	{ 0x1e922, 0x1e943 },
};

CharRange unicode_letter[761] = {
	{ 0x41, 0x5a },
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xba, 0xba },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xf6 },
	{ 0xf8, 0x2c1 },
	{ 0x2c6, 0x2d1 },
	{ 0x2e0, 0x2e4 },
	{ 0x2ec, 0x2ec },
	{ 0x2ee, 0x2ee },
	{ 0x345, 0x345 },
	{ 0x363, 0x374 },
	{ 0x376, 0x377 },
	{ 0x37a, 0x37d },
	{ 0x37f, 0x37f },
	{ 0x386, 0x386 },
	{ 0x388, 0x38a },
	{ 0x38c, 0x38c },
	{ 0x38e, 0x3a1 },
	{ 0x3a3, 0x3f5 },
	{ 0x3f7, 0x481 },
	{ 0x48a, 0x52f },
	{ 0x531, 0x556 },

Review comment (suggestion):
```suggestion
const int unicode_letter_size = 761;
const CharRange unicode_letter[unicode_letter_size] = {
```

Code after:
	{ 0x1d4bd, 0x1d4c3 },
	{ 0x1d4c5, 0x1d4cf },
	{ 0x1d4ea, 0x1d503 },
	{ 0x1d51e, 0x1d537 },
	{ 0x1d552, 0x1d56b },
	{ 0x1d586, 0x1d59f },
	{ 0x1d5ba, 0x1d5d3 },
	{ 0x1d5ee, 0x1d607 },
	{ 0x1d622, 0x1d63b },
	{ 0x1d656, 0x1d66f },
	{ 0x1d68a, 0x1d6a5 },
	{ 0x1d6c2, 0x1d6da },
	{ 0x1d6dc, 0x1d6e1 },
	{ 0x1d6fc, 0x1d714 },
	{ 0x1d716, 0x1d71b },
	{ 0x1d736, 0x1d74e },
	{ 0x1d750, 0x1d755 },
	{ 0x1d770, 0x1d788 },
	{ 0x1d78a, 0x1d78f },
	{ 0x1d7aa, 0x1d7c2 },
	{ 0x1d7c4, 0x1d7c9 },
	{ 0x1d7cb, 0x1d7cb },
	{ 0x1df00, 0x1df09 },
	{ 0x1df0b, 0x1df1e },
	{ 0x1df25, 0x1df2a },
	{ 0x1e030, 0x1e06d },
	{ 0x1e922, 0x1e943 },
};

const int unicode_letter_size = 761;
const CharRange unicode_letter[unicode_letter_size] = {
	{ 0x41, 0x5a },
	{ 0x61, 0x7a },
	{ 0xaa, 0xaa },
	{ 0xb5, 0xb5 },
	{ 0xba, 0xba },
	{ 0xc0, 0xd6 },
	{ 0xd8, 0xf6 },
	{ 0xf8, 0x2c1 },
	{ 0x2c6, 0x2d1 },
	{ 0x2e0, 0x2e4 },
	{ 0x2ec, 0x2ec },
	{ 0x2ee, 0x2ee },
	{ 0x345, 0x345 },
	{ 0x363, 0x374 },
	{ 0x376, 0x377 },
	{ 0x37a, 0x37d },
	{ 0x37f, 0x37f },
	{ 0x386, 0x386 },
	{ 0x388, 0x38a },
	{ 0x38c, 0x38c },
Repository: godotengine/godot
File: platform/android/export/export_plugin.cpp (C++)

Code before:
				break;
			}
		}
	}

	if (ea->has_runnable_preset.is_set() && EDITOR_GET("export/android/shutdown_adb_on_exit")) {
		String adb = get_adb_path();
		if (!FileAccess::exists(adb)) {
			return; //adb not configured
		}

		List<String> args;
		args.push_back("kill-server");
		OS::get_singleton()->execute(adb, args);
	}
}

void EditorExportPlatformAndroid::_update_preset_status() {
	bool has_runnable = EditorExport::get_singleton()->get_runnable_preset_for_platform(this).is_valid();
	if (has_runnable) {
		has_runnable_preset.set();
	} else {
		has_runnable_preset.clear();
	}
	devices_changed.set();
}
#endif

String EditorExportPlatformAndroid::get_project_name(const Ref<EditorExportPreset> &p_preset, const String &p_name) const {
	String aname;
	if (!p_name.is_empty()) {
		aname = p_name;
	} else {
		aname = get_project_setting(p_preset, "application/config/name");
	}

	if (aname.is_empty()) {
		aname = GODOT_VERSION_NAME;
	}

	return aname;
}

String EditorExportPlatformAndroid::get_package_name(const Ref<EditorExportPreset> &p_preset, const String &p_package) const {
	String pname = p_package;
	String name = get_valid_basename(p_preset);
	pname = pname.replace("$genname", name);
	return pname;
}

// Returns the project name without invalid characters

Review comment (suggestion):
Add guards to ensure the polling thread is started and stopped only when `ANDROID_ENABLED` is not defined.

Code after:
				break;
			}
		}
	}

	if (ea->has_runnable_preset.is_set() && EDITOR_GET("export/android/shutdown_adb_on_exit")) {
		String adb = get_adb_path();
		if (!FileAccess::exists(adb)) {
			return; //adb not configured
		}

		List<String> args;
		args.push_back("kill-server");
		OS::get_singleton()->execute(adb, args);
	}
}

void EditorExportPlatformAndroid::_update_preset_status() {
	bool has_runnable = EditorExport::get_singleton()->get_runnable_preset_for_platform(this).is_valid();
	if (has_runnable) {
		has_runnable_preset.set();
		_start_check_for_changes_poll_thread();
	} else {
		has_runnable_preset.clear();
		_stop_check_for_changes_poll_thread();
	}
	devices_changed.set();
}

void EditorExportPlatformAndroid::_start_check_for_changes_poll_thread() {
	quit_request.clear();
	if (!check_for_changes_thread.is_started()) {
		check_for_changes_thread.start(_check_for_changes_poll_thread, this);
	}
}

void EditorExportPlatformAndroid::_stop_check_for_changes_poll_thread() {
	quit_request.set();
	if (check_for_changes_thread.is_started()) {
		check_for_changes_thread.wait_to_finish();
	}
}
#endif

String EditorExportPlatformAndroid::get_project_name(const Ref<EditorExportPreset> &p_preset, const String &p_name) const {
	String aname;
	if (!p_name.is_empty()) {
		aname = p_name;
	} else {
		aname = get_project_setting(p_preset, "application/config/name");
	}
Repository: godotengine/godot
File: scene/gui/tab_container.cpp (C++)

Code before:
void TabContainer::set_deselect_enabled(bool p_enabled) {
	tab_bar->set_deselect_enabled(p_enabled);
}

bool TabContainer::get_deselect_enabled() const {
	return tab_bar->get_deselect_enabled();
}

Control *TabContainer::get_tab_control(int p_idx) const {
	for (int i = 0; i < get_child_count(); i++) {
		Control *control = _as_tab_control(get_child(i));
		if (!control) {
			continue;
		}

		if (p_idx > 0) {
			p_idx--;
		} else {
			return control;
		}
	}
	return nullptr;
}

Control *TabContainer::get_current_tab_control() const {
	return get_tab_control(tab_bar->get_current_tab());
}

int TabContainer::get_tab_idx_at_point(const Point2 &p_point) const {
	return tab_bar->get_tab_idx_at_point(p_point);
}

int TabContainer::get_tab_idx_from_control(Control *p_child) const {
	ERR_FAIL_NULL_V(p_child, -1);
	ERR_FAIL_COND_V(p_child->get_parent() != this, -1);

	int idx = 0;
	for (int i = 0; i < get_child_count(); i++) {
		Control *control = _as_tab_control(get_child(i));
		if (!control) {
			continue;
		}

		if (control == p_child) {
			return idx;
		}
		idx++;
	}
	return -1;
}


Review comment (suggestion):
If `p_idx` is passed as negative, this changes it to return the first when it should return null.

Code after:
}

void TabContainer::set_deselect_enabled(bool p_enabled) {
	tab_bar->set_deselect_enabled(p_enabled);
}

bool TabContainer::get_deselect_enabled() const {
	return tab_bar->get_deselect_enabled();
}

Control *TabContainer::get_tab_control(int p_idx) const {
	if (p_idx < 0) {
		return nullptr;
	}
	ERR_THREAD_GUARD_V(nullptr);

	for (Node *child : iterate_children()) {
		Control *control = _as_tab_control(child);
		if (!control) {
			continue;
		}

		if (p_idx > 0) {
			p_idx--;
		} else {
			return control;
		}
	}
	return nullptr;
}

Control *TabContainer::get_current_tab_control() const {
	return get_tab_control(tab_bar->get_current_tab());
}

int TabContainer::get_tab_idx_at_point(const Point2 &p_point) const {
	return tab_bar->get_tab_idx_at_point(p_point);
}

int TabContainer::get_tab_idx_from_control(Control *p_child) const {
	ERR_FAIL_NULL_V(p_child, -1);
	ERR_FAIL_COND_V(p_child->get_parent() != this, -1);
	ERR_THREAD_GUARD_V(-1);

	int idx = 0;
	for (Node *child : iterate_children()) {
		Control *control = _as_tab_control(child);
		if (!control) {
			continue;
		}