diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-17 17:31:54 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-17 17:31:54 +0200 |
commit | 3c4b110ae014972c4c2e7a6c9704cd1b6c79f6ef (patch) | |
tree | bfe2a84edd5d2ae0f0de942cd3f51f77efe74dfa /modules/text_server_adv | |
parent | fde8838316f3f73e91ddc4e203a9a2a6c0ac327b (diff) | |
parent | 21341ddaed0469baa8f24b4c2fae76275cce59e0 (diff) |
Merge pull request #67521 from nikitalita/speed_up_texture_pos
Speed up `find_texture_pos_for_glyph()`
Diffstat (limited to 'modules/text_server_adv')
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index e21b517f0a..0929d3a2b0 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -810,12 +810,12 @@ _FORCE_INLINE_ TextServerAdvanced::FontTexturePosition TextServerAdvanced::find_ ret.y = 0x7fffffff; ret.x = 0; + const int *ct_offsets_ptr = ct.offsets.ptr(); for (int j = 0; j < ct.texture_w - mw; j++) { int max_y = 0; - for (int k = j; k < j + mw; k++) { - int y = ct.offsets[k]; + int y = ct_offsets_ptr[k]; if (y > max_y) { max_y = y; } |