1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

Applications: Fix undefined behavior capturing non-static constexpr

This commit is contained in:
Lenny Maiorani 2022-03-02 17:55:14 -07:00 committed by Brian Gianforcaro
parent 7a538c1e39
commit 064cfd6cb7
2 changed files with 19 additions and 19 deletions

View file

@ -43,6 +43,17 @@
#include <LibGfx/TextDirection.h>
#include <LibUnicode/CharacterTypes.h>
static constexpr Array pangrams = {
"quick fox jumps nightly above wizard",
"five quacking zephyrs jolt my wax bed",
"pack my box with five dozen liquor jugs",
"quick brown fox jumps over the lazy dog",
"waxy and quivering jocks fumble the pizza",
"~#:[@_1%]*{$2.3}/4^(5'6\")-&|7+8!=<9,0\\>?;",
"byxfjärmat föl gick på duvshowen",
"         "
};
static RefPtr<GUI::Window> create_font_preview_window(FontEditorWidget& editor)
{
auto window = GUI::Window::construct(&editor);
@ -73,17 +84,6 @@ static RefPtr<GUI::Window> create_font_preview_window(FontEditorWidget& editor)
textbox_button_container.set_layout<GUI::HorizontalBoxLayout>();
textbox_button_container.set_fixed_height(22);
constexpr Array pangrams = {
"quick fox jumps nightly above wizard",
"five quacking zephyrs jolt my wax bed",
"pack my box with five dozen liquor jugs",
"quick brown fox jumps over the lazy dog",
"waxy and quivering jocks fumble the pizza",
"~#:[@_1%]*{$2.3}/4^(5'6\")-&|7+8!=<9,0\\>?;",
"byxfjärmat föl gick på duvshowen",
"         "
};
auto& preview_textbox = textbox_button_container.add<GUI::TextBox>();
preview_textbox.set_text(pangrams[0]);
preview_textbox.set_placeholder("Preview text");