1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Text: fixed unused variable warning on builds without asserts.

This commit is contained in:
ocornut 2025-12-21 18:22:48 +01:00
parent a5dffbec38
commit d87650dffb

View file

@ -5384,6 +5384,7 @@ void ImTextClassifierClear(ImU32* bits, unsigned int codepoint_min, unsigned int
void ImTextClassifierSetCharClass(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class, unsigned int c) void ImTextClassifierSetCharClass(ImU32* bits, unsigned int codepoint_min, unsigned int codepoint_end, ImWcharClass char_class, unsigned int c)
{ {
IM_ASSERT(c >= codepoint_min && c < codepoint_end); IM_ASSERT(c >= codepoint_min && c < codepoint_end);
IM_UNUSED(codepoint_end);
c -= codepoint_min; c -= codepoint_min;
const ImU32 shift = (c & 15) << 1; const ImU32 shift = (c & 15) << 1;
bits[c >> 4] = (bits[c >> 4] & ~(0x03 << shift)) | (char_class << shift); bits[c >> 4] = (bits[c >> 4] & ~(0x03 << shift)) | (char_class << shift);