summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-12 14:17:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-12 14:17:48 +0200
commitc66761f98d8c64e2b20dd3a0f7a33be5880c6b47 (patch)
tree8ab05e4cf8c73eacf58b78061883578ba87a5362 /unotools
parent0dc02bb9618e9852c5b3326a678910283922ffd7 (diff)
Silence -Werror,-Wimplicit-fallthrough under NDEBUG
Change-Id: Iff742ad9a53086028049dd2df3bf63303c32c317
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/textsearch.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index f61ad1841039..fa520d0d3a3e 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();