@@ -297,15 +297,15 @@ ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sou
297
297
case 4 :
298
298
*--target = (UTF8)((ch | byteMark) & byteMask);
299
299
ch >>= 6 ;
300
- BP_FALLTHROUGH ;
300
+ [[fallthrough]] ;
301
301
case 3 :
302
302
*--target = (UTF8)((ch | byteMark) & byteMask);
303
303
ch >>= 6 ;
304
- BP_FALLTHROUGH ;
304
+ [[fallthrough]] ;
305
305
case 2 :
306
306
*--target = (UTF8)((ch | byteMark) & byteMask);
307
307
ch >>= 6 ;
308
- BP_FALLTHROUGH ;
308
+ [[fallthrough]] ;
309
309
case 1 :
310
310
*--target = (UTF8)(ch | firstByteMark[bytesToWrite]);
311
311
}
@@ -338,10 +338,10 @@ Boolean isLegalUTF8(const UTF8 *source, int length) {
338
338
/* Everything else falls through when "true"... */
339
339
case 4 :
340
340
if ((a = (*--srcptr)) < 0x80 || a > 0xBF ) return false ;
341
- BP_FALLTHROUGH ;
341
+ [[fallthrough]] ;
342
342
case 3 :
343
343
if ((a = (*--srcptr)) < 0x80 || a > 0xBF ) return false ;
344
- BP_FALLTHROUGH ;
344
+ [[fallthrough]] ;
345
345
case 2 :
346
346
if ((a = (*--srcptr)) > 0xBF ) return false ;
347
347
@@ -353,7 +353,7 @@ Boolean isLegalUTF8(const UTF8 *source, int length) {
353
353
case 0xF4 : if (a > 0x8F ) return false ; break ;
354
354
default : if (a < 0x80 ) return false ;
355
355
}
356
- BP_FALLTHROUGH ;
356
+ [[fallthrough]] ;
357
357
case 1 : if (*source >= 0x80 && *source < 0xC2 ) return false ;
358
358
}
359
359
if (*source > 0xF4 ) return false ;
@@ -399,12 +399,12 @@ ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourc
399
399
*/
400
400
switch (extraBytesToRead) {
401
401
/* remember, illegal UTF-8 */
402
- case 5 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
402
+ case 5 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
403
403
/* remember, illegal UTF-8 */
404
- case 4 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
405
- case 3 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
406
- case 2 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
407
- case 1 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
404
+ case 4 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
405
+ case 3 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
406
+ case 2 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
407
+ case 1 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
408
408
case 0 : ch += *source++;
409
409
}
410
410
ch -= offsetsFromUTF8[extraBytesToRead];
@@ -493,15 +493,15 @@ ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sou
493
493
case 4 :
494
494
*--target = (UTF8)((ch | byteMark) & byteMask);
495
495
ch >>= 6 ;
496
- BP_FALLTHROUGH ;
496
+ [[fallthrough]] ;
497
497
case 3 :
498
498
*--target = (UTF8)((ch | byteMark) & byteMask);
499
499
ch >>= 6 ;
500
- BP_FALLTHROUGH ;
500
+ [[fallthrough]] ;
501
501
case 2 :
502
502
*--target = (UTF8)((ch | byteMark) & byteMask);
503
503
ch >>= 6 ;
504
- BP_FALLTHROUGH ;
504
+ [[fallthrough]] ;
505
505
case 1 :
506
506
*--target = (UTF8) (ch | firstByteMark[bytesToWrite]);
507
507
}
@@ -534,11 +534,11 @@ ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourc
534
534
* The cases all fall through. See "Note A" below.
535
535
*/
536
536
switch (extraBytesToRead) {
537
- case 5 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
538
- case 4 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
539
- case 3 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
540
- case 2 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
541
- case 1 : ch += *source++; ch <<= 6 ; BP_FALLTHROUGH ;
537
+ case 5 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
538
+ case 4 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
539
+ case 3 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
540
+ case 2 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
541
+ case 1 : ch += *source++; ch <<= 6 ; [[fallthrough]] ;
542
542
case 0 : ch += *source++;
543
543
}
544
544
ch -= offsetsFromUTF8[extraBytesToRead];
0 commit comments