mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
Revert "Userland: static vs non-static constexpr variables"
This reverts commit 800ea8ea96
.
Booting the system no longer worked after these changes.
This commit is contained in:
parent
68f76b9e37
commit
d60ebbbba6
38 changed files with 184 additions and 192 deletions
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibGUI/Calendar.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
@ -17,21 +16,21 @@ REGISTER_WIDGET(GUI, Calendar);
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static constexpr Array long_day_names = {
|
||||
static const char* long_day_names[] = {
|
||||
"Sunday", "Monday", "Tuesday", "Wednesday",
|
||||
"Thursday", "Friday", "Saturday"
|
||||
};
|
||||
|
||||
static constexpr Array short_day_names = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||
static constexpr Array mini_day_names = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" };
|
||||
static constexpr Array micro_day_names = { "S", "M", "T", "W", "T", "F", "S" };
|
||||
static const char* short_day_names[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||
static const char* mini_day_names[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" };
|
||||
static const char* micro_day_names[] = { "S", "M", "T", "W", "T", "F", "S" };
|
||||
|
||||
static constexpr Array long_month_names = {
|
||||
static const char* long_month_names[] = {
|
||||
"January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"
|
||||
};
|
||||
|
||||
static constexpr Array short_month_names = {
|
||||
static const char* short_month_names[] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
|
|
@ -15,9 +15,9 @@ REGISTER_WIDGET(GUI, CheckBox)
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static constexpr int s_box_width = 13;
|
||||
static constexpr int s_box_height = 13;
|
||||
static constexpr int s_horizontal_padding = 6;
|
||||
static const int s_box_width = 13;
|
||||
static const int s_box_height = 13;
|
||||
static const int s_horizontal_padding = 6;
|
||||
|
||||
CheckBox::CheckBox(String text)
|
||||
: AbstractButton(move(text))
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static constexpr char s_arrow_bitmap_data[] = {
|
||||
static const char* s_arrow_bitmap_data = {
|
||||
" "
|
||||
" # "
|
||||
" ## "
|
||||
|
@ -24,8 +24,8 @@ static constexpr char s_arrow_bitmap_data[] = {
|
|||
" # "
|
||||
" "
|
||||
};
|
||||
static constexpr int s_arrow_bitmap_width = 9;
|
||||
static constexpr int s_arrow_bitmap_height = 9;
|
||||
static const int s_arrow_bitmap_width = 9;
|
||||
static const int s_arrow_bitmap_height = 9;
|
||||
|
||||
ColumnsView::ColumnsView()
|
||||
{
|
||||
|
|
|
@ -169,10 +169,7 @@ Icon FileIconProvider::icon_for_executable(const String& path)
|
|||
int image_size;
|
||||
};
|
||||
|
||||
constexpr Array icon_sections = {
|
||||
IconSection { .section_name = "serenity_icon_s", .image_size = 16 },
|
||||
IconSection { .section_name = "serenity_icon_m", .image_size = 32 }
|
||||
};
|
||||
static const IconSection icon_sections[] = { { .section_name = "serenity_icon_s", .image_size = 16 }, { .section_name = "serenity_icon_m", .image_size = 32 } };
|
||||
|
||||
bool had_error = false;
|
||||
for (const auto& icon_section : icon_sections) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static constexpr char s_resize_corner_shadows_data[] = {
|
||||
static const char* s_resize_corner_shadows_data = {
|
||||
" "
|
||||
" ## "
|
||||
" # "
|
||||
|
@ -31,7 +31,7 @@ static constexpr char s_resize_corner_shadows_data[] = {
|
|||
" "
|
||||
};
|
||||
|
||||
static constexpr char s_resize_corner_highlights_data[] = {
|
||||
static const char* s_resize_corner_highlights_data = {
|
||||
" "
|
||||
" "
|
||||
" # "
|
||||
|
@ -52,8 +52,8 @@ static constexpr char s_resize_corner_highlights_data[] = {
|
|||
|
||||
static Gfx::CharacterBitmap* s_resize_corner_shadows_bitmap;
|
||||
static Gfx::CharacterBitmap* s_resize_corner_highlights_bitmap;
|
||||
static constexpr int s_resize_corner_bitmap_width = 16;
|
||||
static constexpr int s_resize_corner_bitmap_height = 16;
|
||||
static const int s_resize_corner_bitmap_width = 16;
|
||||
static const int s_resize_corner_bitmap_height = 16;
|
||||
|
||||
ResizeCorner::ResizeCorner()
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ REGISTER_WIDGET(GUI, Scrollbar)
|
|||
|
||||
namespace GUI {
|
||||
|
||||
static constexpr char s_up_arrow_bitmap_data[] = {
|
||||
static const char* s_up_arrow_bitmap_data = {
|
||||
" "
|
||||
" # "
|
||||
" ### "
|
||||
|
@ -27,7 +27,7 @@ static constexpr char s_up_arrow_bitmap_data[] = {
|
|||
" "
|
||||
};
|
||||
|
||||
static constexpr char s_down_arrow_bitmap_data[] = {
|
||||
static const char* s_down_arrow_bitmap_data = {
|
||||
" "
|
||||
" ### "
|
||||
" ### "
|
||||
|
@ -39,7 +39,7 @@ static constexpr char s_down_arrow_bitmap_data[] = {
|
|||
" "
|
||||
};
|
||||
|
||||
static constexpr char s_left_arrow_bitmap_data[] = {
|
||||
static const char* s_left_arrow_bitmap_data = {
|
||||
" "
|
||||
" # "
|
||||
" ## "
|
||||
|
@ -51,7 +51,7 @@ static constexpr char s_left_arrow_bitmap_data[] = {
|
|||
" "
|
||||
};
|
||||
|
||||
static constexpr char s_right_arrow_bitmap_data[] = {
|
||||
static const char* s_right_arrow_bitmap_data = {
|
||||
" "
|
||||
" # "
|
||||
" ## "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue