Use pointers in const char arrays

This commit is contained in:
Brendan M. Sleight 2022-09-15 19:16:47 +00:00
parent 6ae0d47461
commit 4bc27cd593

View File

@ -109,10 +109,10 @@ void WatchFaceAccurateWords::Refresh() {
uint8_t hour_adjusted;
char words[78];
char part_day[20];
const char hour_word_array[26][10] = {"midnight", "one", "two", "three", "four", "five", "six", "seven", "eight",
const char* hour_word_array[26] = {"midnight", "one", "two", "three", "four", "five", "six", "seven", "eight",
"nine", "ten", "eleven", "twelve", "one", "two", "three", "four", "five",
"six", "seven", "eight", "nine", "ten", "eleven", "midnight"};
const char part_day_word_array[9][20] = {" at night",
const char* part_day_word_array[9] = {" at night",
" in the early hours",
" in the morning",
" in the morning",
@ -120,7 +120,7 @@ void WatchFaceAccurateWords::Refresh() {
" in the afternoon",
" in the evening",
" at night"};
const char minutes_rough_array[14][18] = {"",
const char* minutes_rough_array[14] = {"",
"five past ",
"ten past ",
"quarter past ",
@ -133,11 +133,11 @@ void WatchFaceAccurateWords::Refresh() {
"ten to ",
"five to "
""};
const char minutes_accurate_array[6][16] = {"", "just gone ", "a little after ", "coming up to ", "almost "};
const char days_array[9][10] = {"", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
const char months_array[13][10] =
const char* minutes_accurate_array[6] = {"", "just gone ", "a little after ", "coming up to ", "almost "};
const char* days_array[9] = {"", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
const char* months_array[13] =
{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
const char months_numbers_array[32][15] = {
const char* months_numbers_array[32] = {
"zero", "first", "second", "third", "fourth", "fifth", "sixth", "seventh",
"eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth",
"sixteenth", "seventeenth", "eighteenth", "nineteenth", "twentieth", "twenty-first", "twenty-second", "twenty-third",