mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
This commit is contained in:
parent
f0f5319b0b
commit
e34f1f504c
33 changed files with 71 additions and 67 deletions
|
|
@ -508,7 +508,7 @@ TEST_SUITE("[TextServer]") {
|
|||
{ U"test\r test", { 0, 5, 5, 10 } },
|
||||
{ U"test\r test \r test", { 0, 5, 5, 12, 12, 17 } },
|
||||
};
|
||||
for (size_t j = 0; j < sizeof(cases) / sizeof(TestCase); j++) {
|
||||
for (size_t j = 0; j < std::size(cases); j++) {
|
||||
RID ctx = ts->create_shaped_text();
|
||||
CHECK_FALSE_MESSAGE(ctx == RID(), "Creating text buffer failed.");
|
||||
bool ok = ts->shaped_text_add_string(ctx, cases[j].text, font, 16);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue