@@ -57,6 +57,7 @@ std::unique_ptr<WLayoutItem> WBoxLayout::removeItem(WLayoutItem *item)
5757 case LayoutDirection ::RightToLeft :
5858 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
5959 index = grid_ .columns_ .size () - 1 - index ;
60+ WT_FALLTHROUGH
6061 case LayoutDirection ::LeftToRight : {
6162 result = std ::move (grid_ .items_ [0 ][index ].item_ );
6263 grid_ .columns_ .erase (grid_ .columns_ .begin () + index );
@@ -66,6 +67,7 @@ std::unique_ptr<WLayoutItem> WBoxLayout::removeItem(WLayoutItem *item)
6667 case LayoutDirection ::BottomToTop :
6768 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
6869 index = grid_ .rows_ .size () - 1 - index ;
70+ WT_FALLTHROUGH
6971 case LayoutDirection ::TopToBottom : {
7072 result = std ::move (grid_ .items_ [index ][0 ].item_ );
7173 grid_ .rows_ .erase (grid_ .rows_ .begin () + index );
@@ -85,11 +87,13 @@ WLayoutItem *WBoxLayout::itemAt(int index) const
8587 case LayoutDirection ::RightToLeft :
8688 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
8789 index = grid_ .columns_ .size () - 1 - index ;
90+ WT_FALLTHROUGH
8891 case LayoutDirection ::LeftToRight :
8992 return grid_ .items_ [0 ][index ].item_ .get ();
9093 case LayoutDirection ::BottomToTop :
9194 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
9295 index = grid_ .rows_ .size () - 1 - index ;
96+ WT_FALLTHROUGH
9397 case LayoutDirection ::TopToBottom :
9498 return grid_ .items_ [index ][0 ].item_ .get ();
9599 }
@@ -207,12 +211,14 @@ void WBoxLayout::setStretchFactor(int i, int stretch)
207211 case LayoutDirection ::RightToLeft :
208212 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
209213 i = grid_ .columns_ .size () - 1 - i ;
214+ WT_FALLTHROUGH
210215 case LayoutDirection ::LeftToRight :
211216 grid_ .columns_ [i ].stretch_ = stretch ;
212217 break ;
213218 case LayoutDirection ::BottomToTop :
214219 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
215220 i = grid_ .rows_ .size () - 1 - i ;
221+ WT_FALLTHROUGH
216222 case LayoutDirection ::TopToBottom :
217223 grid_ .rows_ [i ].stretch_ = stretch ;
218224 }
@@ -227,6 +233,7 @@ void WBoxLayout::insertItem(int index, std::unique_ptr<WLayoutItem> item,
227233 case LayoutDirection ::RightToLeft :
228234 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
229235 index = grid_ .columns_ .size () - index ;
236+ WT_FALLTHROUGH
230237 case LayoutDirection ::LeftToRight :
231238 grid_ .columns_ .insert (grid_ .columns_ .begin () + index ,
232239 Impl ::Grid ::Section (stretch ));
@@ -241,6 +248,7 @@ void WBoxLayout::insertItem(int index, std::unique_ptr<WLayoutItem> item,
241248 case LayoutDirection ::BottomToTop :
242249 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
243250 index = grid_ .rows_ .size () - index ;
251+ WT_FALLTHROUGH
244252 case LayoutDirection ::TopToBottom :
245253 if (grid_ .columns_ .empty ()) {
246254 grid_ .columns_ .push_back (Impl ::Grid ::Section ());
@@ -285,13 +293,15 @@ void WBoxLayout::setResizable(int index, bool enabled,
285293 case LayoutDirection ::RightToLeft :
286294 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
287295 index = grid_ .columns_ .size () - 1 - index ;
296+ WT_FALLTHROUGH
288297 case LayoutDirection ::LeftToRight :
289298 grid_ .columns_ [index ].resizable_ = enabled ;
290299 grid_ .columns_ [index ].initialSize_ = initialSize ;
291300 break ;
292301 case LayoutDirection ::BottomToTop :
293302 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
294303 index = grid_ .rows_ .size () - 1 - index ;
304+ WT_FALLTHROUGH
295305 case LayoutDirection ::TopToBottom :
296306 grid_ .rows_ [index ].resizable_ = enabled ;
297307 grid_ .rows_ [index ].initialSize_ = initialSize ;
@@ -306,11 +316,13 @@ bool WBoxLayout::isResizable(int index) const
306316 case LayoutDirection ::RightToLeft :
307317 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
308318 index = grid_ .columns_ .size () - 1 - index ;
319+ WT_FALLTHROUGH
309320 case LayoutDirection ::LeftToRight :
310321 return grid_ .columns_ [index ].resizable_ ;
311322 case LayoutDirection ::BottomToTop :
312323 if ((impl () && implementation () != LayoutImplementation ::Flex ) || !implementationIsFlexLayout ())
313324 index = grid_ .rows_ .size () - 1 - index ;
325+ WT_FALLTHROUGH
314326 case LayoutDirection ::TopToBottom :
315327 return grid_ .rows_ [index ].resizable_ ;
316328 }
0 commit comments