mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Use initializer list in Arrays
This commit is contained in:
parent
594d64ec24
commit
75881f8322
72 changed files with 347 additions and 947 deletions
|
|
@ -72,10 +72,7 @@ TEST_SUITE("[TextServer]") {
|
|||
ts->font_set_data_ptr(font2, _font_NotoSansThai_Regular, _font_NotoSansThai_Regular_size);
|
||||
ts->font_set_allow_system_fallback(font2, false);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
font.push_back(font2);
|
||||
|
||||
Array font = { font1, font2 };
|
||||
String test = U"คนอ้วน khon uan ראה";
|
||||
// 6^ 17^
|
||||
|
||||
|
|
@ -125,10 +122,7 @@ TEST_SUITE("[TextServer]") {
|
|||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_Vazirmatn_Regular, _font_Vazirmatn_Regular_size);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
font.push_back(font2);
|
||||
|
||||
Array font = { font1, font2 };
|
||||
String test = U"Arabic (اَلْعَرَبِيَّةُ, al-ʿarabiyyah)";
|
||||
// 7^ 26^
|
||||
|
||||
|
|
@ -182,11 +176,7 @@ TEST_SUITE("[TextServer]") {
|
|||
ts->font_set_data_ptr(font3, _font_Vazirmatn_Regular, _font_Vazirmatn_Regular_size);
|
||||
ts->font_set_allow_system_fallback(font3, false);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
font.push_back(font2);
|
||||
font.push_back(font3);
|
||||
|
||||
Array font = { font1, font2, font3 };
|
||||
{
|
||||
RID ctx = ts->create_shaped_text();
|
||||
CHECK_FALSE_MESSAGE(ctx == RID(), "Creating text buffer failed.");
|
||||
|
|
@ -579,10 +569,7 @@ TEST_SUITE("[TextServer]") {
|
|||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_NotoSansThai_Regular, _font_NotoSansThai_Regular_size);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
font.push_back(font2);
|
||||
|
||||
Array font = { font1, font2 };
|
||||
RID ctx = ts->create_shaped_text();
|
||||
CHECK_FALSE_MESSAGE(ctx == RID(), "Creating text buffer failed.");
|
||||
bool ok = ts->shaped_text_add_string(ctx, test_1, font, 16);
|
||||
|
|
@ -637,10 +624,7 @@ TEST_SUITE("[TextServer]") {
|
|||
RID font2 = ts->create_font();
|
||||
ts->font_set_data_ptr(font2, _font_Vazirmatn_Regular, _font_Vazirmatn_Regular_size);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
font.push_back(font2);
|
||||
|
||||
Array font = { font1, font2 };
|
||||
String test_1 = U"الحمد";
|
||||
String test_2 = U"الحمد test";
|
||||
String test_3 = U"test test";
|
||||
|
|
@ -949,9 +933,7 @@ TEST_SUITE("[TextServer]") {
|
|||
RID font1 = ts->create_font();
|
||||
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
|
||||
|
||||
Array font;
|
||||
font.push_back(font1);
|
||||
|
||||
Array font = { font1 };
|
||||
RID ctx = ts->create_shaped_text();
|
||||
CHECK_FALSE_MESSAGE(ctx == RID(), "Creating text buffer failed.");
|
||||
bool ok = ts->shaped_text_add_string(ctx, "T", font, 16);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue