1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Optimize Color::to_html by allocating less.

This commit is contained in:
Lukas Tenbrink
2025-03-20 02:02:25 +01:00
parent 3d9b05ad4a
commit 143f8e933e
3 changed files with 16 additions and 21 deletions

View File

@@ -36,6 +36,9 @@
#include <iterator>
static constexpr char hex_char_table_upper[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
static constexpr char hex_char_table_lower[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
#define BSEARCH_CHAR_RANGE(m_array) \
int low = 0; \
int high = std::size(m_array) - 1; \