@@ -126,11 +126,11 @@ VOID CALLBACK DiscordTimer(_In_ HWND hwnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent
126126
127127 if (configButtons[0 ].IsValid ())
128128 {
129- buttons[ 0 ] = { configButtons[0 ].label . c_str (), configButtons[ 0 ]. url . c_str () } ;
129+ configButtons[0 ].FillStruct (buttons) ;
130130 // Nested condition because there will never be a single button in index 1.
131131 if (configButtons[1 ].IsValid ())
132132 {
133- buttons[ 1 ] = { configButtons[1 ].label . c_str (), configButtons[ 1 ]. url . c_str () } ;
133+ configButtons[1 ].FillStruct (buttons+ 1 ) ;
134134 }
135135 else {
136136 buttons[1 ] = { " " , " " };
@@ -158,11 +158,11 @@ VOID CALLBACK DiscordTimer(_In_ HWND hwnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent
158158
159159 if (configButtons[0 ].IsValid ())
160160 {
161- buttons[ 0 ] = { configButtons[0 ].label . c_str (), configButtons[ 0 ]. url . c_str () } ;
161+ configButtons[0 ].FillStruct (buttons) ;
162162 // Nested condition because there will never be a single button in index 1.
163163 if (configButtons[1 ].IsValid ())
164164 {
165- buttons[ 1 ] = { configButtons[1 ].label . c_str (), configButtons[ 1 ]. url . c_str () } ;
165+ configButtons[1 ].FillStruct (buttons+ 1 ) ;
166166 }
167167 else {
168168 buttons[1 ] = { " " , " " };
@@ -192,11 +192,11 @@ VOID CALLBACK DiscordTimer(_In_ HWND hwnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent
192192
193193 if (configButtons[0 ].IsValid ())
194194 {
195- buttons[ 0 ] = { configButtons[0 ].label . c_str (), configButtons[ 0 ]. url . c_str () } ;
195+ configButtons[0 ].FillStruct (buttons) ;
196196 // Nested condition because there will never be a single button in index 1.
197197 if (configButtons[1 ].IsValid ())
198198 {
199- buttons[ 1 ] = { configButtons[1 ].label . c_str (), configButtons[ 1 ]. url . c_str () } ;
199+ configButtons[1 ].FillStruct (buttons+ 1 ) ;
200200 }
201201 else {
202202 buttons[1 ] = { " " , " " };
@@ -283,11 +283,11 @@ VOID CALLBACK DiscordTimer(_In_ HWND hwnd, _In_ UINT uMsg, _In_ UINT_PTR idEvent
283283
284284 if (configButtons[0 ].IsValid ())
285285 {
286- buttons[ 0 ] = { configButtons[0 ].label . c_str (), configButtons[ 0 ]. url . c_str () } ;
286+ configButtons[0 ].FillStruct (buttons) ;
287287 // Nested condition because there will never be a single button in index 1.
288288 if (configButtons[1 ].IsValid ())
289289 {
290- buttons[ 1 ] = { configButtons[1 ].label . c_str (), configButtons[ 1 ]. url . c_str () } ;
290+ configButtons[1 ].FillStruct (buttons+ 1 ) ;
291291 }
292292 else {
293293 buttons[1 ] = { " " , " " };
0 commit comments