diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 10:28:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 14:47:17 +0200 |
commit | 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch) | |
tree | 616ab419fe0f01e94740de7faacb393775420589 /tools/source/datetime | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (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 'tools/source/datetime')
-rw-r--r-- | tools/source/datetime/tdate.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index b53072590585..a5f26b912254 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -49,7 +49,7 @@ const sal_Int16 kYearMin = SAL_MIN_INT16; // Days until start of year from zero, so month and day of month can be added. // year 1 => 0 days, year 2 => 365 days, ... // year -1 => -366 days, year -2 => -731 days, ... -inline sal_Int32 ImpYearToDays( sal_Int16 nYear ) +sal_Int32 ImpYearToDays( sal_Int16 nYear ) { assert( nYear != 0 ); sal_Int32 nOffset; @@ -67,7 +67,7 @@ inline sal_Int32 ImpYearToDays( sal_Int16 nYear ) return nOffset + nYr*365 + nYr/4 - nYr/100 + nYr/400; } -inline bool ImpIsLeapYear( sal_Int16 nYear ) +bool ImpIsLeapYear( sal_Int16 nYear ) { // Leap years BCE are -1, -5, -9, ... // See @@ -81,7 +81,7 @@ inline bool ImpIsLeapYear( sal_Int16 nYear ) } // All callers must have sanitized or normalized month and year values! -inline sal_uInt16 ImplDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear ) +sal_uInt16 ImplDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear ) { if ( nMonth != 2 ) return aDaysInMonth[nMonth-1]; |