unotools/source/i18n/textsearch.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
New commits: commit c66761f98d8c64e2b20dd3a0f7a33be5880c6b47 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu May 12 14:17:48 2016 +0200 Silence -Werror,-Wimplicit-fallthrough under NDEBUG Change-Id: Iff742ad9a53086028049dd2df3bf63303c32c317 diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx index f61ad18..fa520d0 100644 --- a/unotools/source/i18n/textsearch.cxx +++ b/unotools/source/i18n/textsearch.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cstdlib> + #include <i18nlangtag/languagetag.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/util/TextSearch2.hpp> @@ -163,12 +167,11 @@ css::util::SearchOptions2 TextSearch::UpgradeToSearchOptions2( const css::util:: case SearchAlgorithms_APPROXIMATE: nAlgorithmType2 = SearchAlgorithms2::APPROXIMATE; break; - default: - assert(!"utl::TextSearch::UpgradeToSearchOptions2 - default what?"); - // fallthru case SearchAlgorithms_ABSOLUTE: nAlgorithmType2 = SearchAlgorithms2::ABSOLUTE; break; + default: + for (;;) std::abort(); } // It would be nice if an inherited struct had a ctor that takes an // instance of the object the struct derived from.. @@ -222,15 +225,15 @@ void TextSearch::Init( const SearchParam & rParam, aSOpt.searchFlag |= SearchFlags::LEV_RELAXED; break; - default: - assert(!"utl::TextSearch::Init - default what?"); - // fallthru case SearchParam::SRCH_NORMAL: aSOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE; aSOpt.algorithmType = SearchAlgorithms_ABSOLUTE; if( rParam.IsSrchWordOnly() ) aSOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY; break; + + default: + for (;;) std::abort(); } aSOpt.searchString = rParam.GetSrchStr(); aSOpt.replaceString = rParam.GetReplaceStr(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits