summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-09 10:28:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-09 14:47:17 +0200
commit7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch)
tree616ab419fe0f01e94740de7faacb393775420589 /i18npool
parent664db0d945fbb23e115eeea8377e3a4e88541da1 (diff)
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
-rw-r--r--i18npool/source/breakiterator/breakiterator_cjk.cxx2
-rw-r--r--i18npool/source/breakiterator/gendict.cxx16
3 files changed, 10 insertions, 10 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index e923fbd99eaa..531fc8e6ccab 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -118,7 +118,7 @@ Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 n
return result;
}
-static inline bool isCJK( const Locale& rLocale ) {
+static bool isCJK( const Locale& rLocale ) {
return rLocale.Language == "zh" || rLocale.Language == "ja" || rLocale.Language == "ko";
}
diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx
index 5367b975e10c..356782b119f0 100644
--- a/i18npool/source/breakiterator/breakiterator_cjk.cxx
+++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx
@@ -87,7 +87,7 @@ BreakIterator_CJK::getWordBoundary( const OUString& text, sal_Int32 anyPos,
}
namespace {
-inline bool isHangul( sal_Unicode cCh )
+bool isHangul( sal_Unicode cCh )
{
return (cCh >= 0xAC00 && cCh <= 0xD7AF) || (cCh >= 0x1100 && cCh <= 0x11FF);
}
diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx
index 3d373229da17..f36262a34cfe 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -68,12 +68,12 @@ static sal_Int64 existMarkOffset = 0;
static sal_uInt8 exists[0x2000];
static sal_uInt32 charArray[0x10000];
-static inline void set_exists(sal_uInt32 index)
+static void set_exists(sal_uInt32 index)
{
exists[index>>3] |= 1 << (index & 0x07);
}
-static inline void printIncludes(FILE* source_fp)
+static void printIncludes(FILE* source_fp)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fputs("/* !!!The file is generated automatically. DO NOT edit the file manually!!! */\n\n", source_fp);
@@ -83,7 +83,7 @@ static inline void printIncludes(FILE* source_fp)
#endif
}
-static inline void printFunctions(FILE* source_fp, const char *lang)
+static void printFunctions(FILE* source_fp, const char *lang)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fputs ("#ifndef DISABLE_DYNLOADING\n", source_fp);
@@ -105,7 +105,7 @@ static inline void printFunctions(FILE* source_fp, const char *lang)
#endif
}
-static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray)
+static void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray)
{
// generate main dict. data array
#ifndef DICT_JA_ZH_IN_DATAFILE
@@ -158,7 +158,7 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa
#endif
}
-static inline void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenArray)
+static void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenArray)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fprintf(source_fp, "static const sal_Int32 lenArray[] = {\n\t");
@@ -188,7 +188,7 @@ static inline void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenA
/* FIXME?: what happens if in every range i there is at least one charArray != 0
=> this will make index1[] = {0x00, 0x01, 0x02,... 0xfe, 0xff }
=> then in index2, the last range will be ignored incorrectly */
-static inline void printIndex1(FILE *source_fp, sal_Int16 *set)
+static void printIndex1(FILE *source_fp, sal_Int16 *set)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fprintf (source_fp, "static const sal_Int16 index1[] = {\n\t");
@@ -217,7 +217,7 @@ static inline void printIndex1(FILE *source_fp, sal_Int16 *set)
#endif
}
-static inline void printIndex2(FILE *source_fp, sal_Int16 const *set)
+static void printIndex2(FILE *source_fp, sal_Int16 const *set)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fputs ("static const sal_Int32 index2[] = {\n\t", source_fp);
@@ -255,7 +255,7 @@ static inline void printIndex2(FILE *source_fp, sal_Int16 const *set)
/* Generates a bitmask for the existence of sal_Unicode values in dictionary;
it packs 8 sal_Bool values in 1 sal_uInt8 */
-static inline void printExistsMask(FILE *source_fp)
+static void printExistsMask(FILE *source_fp)
{
#ifndef DICT_JA_ZH_IN_DATAFILE
fprintf (source_fp, "static const sal_uInt8 existMark[] = {\n\t");