From ab9b67bbb001f380b3973941443bfbc59fe7141c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 8 Dec 2018 09:46:01 +0100 Subject: Remove obsolete SAL_FALLTHROUGH completely ...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- i18npool/source/calendar/calendar_gregorian.cxx | 4 ++-- i18npool/source/characterclassification/cclass_unicode_parser.cxx | 6 +++--- .../source/defaultnumberingprovider/defaultnumberingprovider.cxx | 4 ++-- i18npool/source/indexentry/indexentrysupplier_default.cxx | 2 +- i18npool/source/localedata/LocaleNode.cxx | 4 ++-- i18npool/source/localedata/localedata.cxx | 2 +- i18npool/source/nativenumber/nativenumbersupplier.cxx | 2 +- i18npool/source/search/textsearch.cxx | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index b8f1d15ee66f..4e4a14dc0079 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -642,7 +642,7 @@ static sal_Int16 NatNumForCalendar(const css::lang::Locale& aLocale, case NativeNumberMode::NATNUM4: if (isKorean) return isShort ? NativeNumberMode::NATNUM9 : NativeNumberMode::NATNUM11; - SAL_FALLTHROUGH; + [[fallthrough]]; default: return 0; } } @@ -863,7 +863,7 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In switch( nCalendarDisplayCode ) { case CalendarDisplayCode::SHORT_MONTH: value += 1; // month is zero based - SAL_FALLTHROUGH; + [[fallthrough]]; case CalendarDisplayCode::SHORT_DAY: sprintf(aStr, "%d", value); // #100211# - checked break; diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 7af1dd8baf45..cc7107e355a2 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -355,7 +355,7 @@ sal_Int32 cclass_Unicode::getParseTokensType(sal_uInt32 const c, bool const isFi case U_OTHER_LETTER : // Non_Spacing_Mark could not be as leading character if (isFirst) break; - SAL_FALLTHROUGH; // treat it as Other_Letter. + [[fallthrough]]; // treat it as Other_Letter. case U_NON_SPACING_MARK : return KParseTokens::UNI_OTHER_LETTER; case U_DECIMAL_DIGIT_NUMBER : @@ -630,7 +630,7 @@ ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) // nor can a spacing combining mark. if (bStart) return ParserFlags::ILLEGAL; - SAL_FALLTHROUGH; // treat it as Other_Letter. + [[fallthrough]]; // treat it as Other_Letter. case U_OTHER_LETTER : return (nTypes & KParseTokens::UNI_OTHER_LETTER) ? (bStart ? ParserFlags::CHAR_WORD : ParserFlags::WORD) : @@ -891,7 +891,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 break; case ssGetWordFirstChar : eState = ssGetWord; - SAL_FALLTHROUGH; + [[fallthrough]]; case ssGetWord : { if ( nMask & ParserFlags::WORD ) diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 899ea58457d3..98f52939bcbe 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -334,8 +334,8 @@ static OUString toRoman( sal_Int32 n ) } switch( nNumber ) { - case 3: sTmp.append(*cRomanStr); SAL_FALLTHROUGH; - case 2: sTmp.append(*cRomanStr); SAL_FALLTHROUGH; + case 3: sTmp.append(*cRomanStr); [[fallthrough]]; + case 2: sTmp.append(*cRomanStr); [[fallthrough]]; case 1: sTmp.append(*cRomanStr); break; case 4: sTmp.append(*cRomanStr).append(*(cRomanStr-nDiff)); break; case 5: sTmp.append(*(cRomanStr-nDiff)); break; diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 85533ae37e4c..2a4d9c37e5ee 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -213,7 +213,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm break; case u'{': close = '}'; - SAL_FALLTHROUGH; + [[fallthrough]]; case u'(': { if (key_count <= 0) throw RuntimeException(); diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index a3d2595022f0..6944059729e4 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -699,7 +699,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const sTheCompatibleCurrency = aCode.copy( nStart + 2, nHyphen - nStart - 2); } } - SAL_FALLTHROUGH; + [[fallthrough]]; case cssi::NumberFormatIndex::CURRENCY_1000INT : case cssi::NumberFormatIndex::CURRENCY_1000INT_RED : case cssi::NumberFormatIndex::CURRENCY_1000DEC2_RED : @@ -1050,7 +1050,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const // separators and generate a second pattern with the // format's separator at the current position. cDateSep2 = cChar; - SAL_FALLTHROUGH; + [[fallthrough]]; default: handleDefault: if (!cDateSep) diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index a72d364244f9..374244eefbe6 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -686,7 +686,7 @@ Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const OUString& return ref_cal.PartitiveMonths; default: OSL_FAIL( "LocaleDataImpl::getCalendarItemByName: unhandled REF_* case"); - SAL_FALLTHROUGH; + [[fallthrough]]; case REF_ERAS: return ref_cal.Eras; } diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 1ae68f02d870..4e6f176edbb2 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -837,7 +837,7 @@ sal_Bool SAL_CALL NativeNumberSupplierService::isValidNatNum( const Locale& rLoc case NativeNumberMode::NATNUM2: // Char, Upper if (langnum == 4) // Hebrew numbering return true; - SAL_FALLTHROUGH; + [[fallthrough]]; case NativeNumberMode::NATNUM4: // Text, Lower, Long case NativeNumberMode::NATNUM5: // Text, Upper, Long case NativeNumberMode::NATNUM6: // Text, FullWidth diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index 906dd12c5263..10b58ba3ea6c 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -241,7 +241,7 @@ void TextSearch::setOptions2( const SearchOptions2& rOptions ) default: SAL_WARN("i18npool","TextSearch::setOptions2 - default what?"); - SAL_FALLTHROUGH; + [[fallthrough]]; case SearchAlgorithms2::ABSOLUTE: fnForward = &TextSearch::NSrchFrwrd; fnBackward = &TextSearch::NSrchBkwrd; @@ -264,7 +264,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) break; default: SAL_WARN("i18npool","TextSearch::setOptions - default what?"); - SAL_FALLTHROUGH; + [[fallthrough]]; case SearchAlgorithms_ABSOLUTE: nAlgorithmType2 = SearchAlgorithms2::ABSOLUTE; break; -- cgit v1.2.3