summaryrefslogtreecommitdiff
path: root/sal/rtl
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 /sal/rtl
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 'sal/rtl')
-rw-r--r--sal/rtl/alloc_arena.cxx10
-rw-r--r--sal/rtl/bootstrap.cxx2
-rw-r--r--sal/rtl/math.cxx6
-rw-r--r--sal/rtl/strtmpl.cxx6
-rw-r--r--sal/rtl/uri.cxx10
5 files changed, 17 insertions, 17 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 39e694e017d8..626d05c7b895 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -130,7 +130,7 @@ bool rtl_arena_segment_populate(rtl_arena_type * arena)
@precond arena->m_lock acquired.
@precond (*ppSegment == 0)
*/
-inline void rtl_arena_segment_get(
+void rtl_arena_segment_get(
rtl_arena_type * arena,
rtl_arena_segment_type ** ppSegment
)
@@ -151,7 +151,7 @@ inline void rtl_arena_segment_get(
@precond arena->m_lock acquired.
@postcond (*ppSegment == 0)
*/
-inline void rtl_arena_segment_put(
+void rtl_arena_segment_put(
rtl_arena_type * arena,
rtl_arena_segment_type ** ppSegment
)
@@ -178,7 +178,7 @@ inline void rtl_arena_segment_put(
/**
@precond arena->m_lock acquired.
*/
-inline void rtl_arena_freelist_insert (
+void rtl_arena_freelist_insert (
rtl_arena_type * arena,
rtl_arena_segment_type * segment
)
@@ -195,7 +195,7 @@ inline void rtl_arena_freelist_insert (
/**
@precond arena->m_lock acquired.
*/
-inline void rtl_arena_freelist_remove(
+void rtl_arena_freelist_remove(
rtl_arena_type * arena,
rtl_arena_segment_type * segment
)
@@ -281,7 +281,7 @@ void rtl_arena_hash_rescale(
/**
Insert arena hash, and update stats.
*/
-inline void rtl_arena_hash_insert(
+void rtl_arena_hash_insert(
rtl_arena_type * arena,
rtl_arena_segment_type * segment
)
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 855beec53348..108420dd0cc2 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -300,7 +300,7 @@ static OUString & getIniFileName_Impl()
// ensure the given file url has no final slash
-static inline void EnsureNoFinalSlash (rtl::OUString & url)
+static void EnsureNoFinalSlash (rtl::OUString & url)
{
sal_Int32 i = url.getLength();
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 12571baf4b86..447aabc365f8 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -218,7 +218,7 @@ int getBitsInFracPart(double fAbsValue)
}
template< typename T >
-inline void doubleToString(typename T::String ** pResult,
+void doubleToString(typename T::String ** pResult,
sal_Int32 * pResultCapacity, sal_Int32 nResultOffset,
double fValue, rtl_math_StringFormat eFormat,
sal_Int32 nDecPlaces, typename T::Char cDecSeparator,
@@ -747,7 +747,7 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult,
namespace {
// if nExp * 10 + nAdd would result in overflow
-inline bool long10Overflow( long& nExp, int nAdd )
+bool long10Overflow( long& nExp, int nAdd )
{
if ( nExp > (LONG_MAX/10)
|| (nExp == (LONG_MAX/10) && nAdd > (LONG_MAX%10)) )
@@ -759,7 +759,7 @@ inline bool long10Overflow( long& nExp, int nAdd )
}
template< typename CharT >
-inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
+double stringToDouble(CharT const * pBegin, CharT const * pEnd,
CharT cDecSeparator, CharT cGroupSeparator,
rtl_math_ConversionStatus * pStatus,
CharT const ** pParsedEnd)
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index e4ccb80b68f4..3cc4d9927274 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -46,7 +46,7 @@ inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* pDest,
}
*/
-static inline void rtl_str_ImplCopy( IMPL_RTL_STRCODE* _pDest,
+static void rtl_str_ImplCopy( IMPL_RTL_STRCODE* _pDest,
const IMPL_RTL_STRCODE* _pSrc,
sal_Int32 _nCount )
{
@@ -989,7 +989,7 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr )
/* ----------------------------------------------------------------------- */
namespace {
- template<typename T, typename U> inline T IMPL_RTL_STRNAME( toInt )( const IMPL_RTL_STRCODE* pStr,
+ template<typename T, typename U> T IMPL_RTL_STRNAME( toInt )( const IMPL_RTL_STRCODE* pStr,
sal_Int16 nRadix )
{
static_assert(std::numeric_limits<T>::is_signed, "is signed");
@@ -1080,7 +1080,7 @@ sal_Int64 SAL_CALL IMPL_RTL_STRNAME( toInt64 )( const IMPL_RTL_STRCODE* pStr,
/* ----------------------------------------------------------------------- */
namespace {
- template <typename T> inline T IMPL_RTL_STRNAME( toUInt )( const IMPL_RTL_STRCODE* pStr,
+ template <typename T> T IMPL_RTL_STRNAME( toUInt )( const IMPL_RTL_STRCODE* pStr,
sal_Int16 nRadix )
{
static_assert(!std::numeric_limits<T>::is_signed, "is not signed");
diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx
index 73fb8a474763..70f1e2e82c20 100644
--- a/sal/rtl/uri.cxx
+++ b/sal/rtl/uri.cxx
@@ -38,7 +38,7 @@ std::size_t const nCharClassSize = 128;
sal_Unicode const cEscapePrefix = 0x25; // '%'
-inline int getHexWeight(sal_uInt32 nUtf32)
+int getHexWeight(sal_uInt32 nUtf32)
{
return nUtf32 >= 0x30 && nUtf32 <= 0x39 ? // '0'--'9'
static_cast< int >(nUtf32 - 0x30) :
@@ -49,12 +49,12 @@ inline int getHexWeight(sal_uInt32 nUtf32)
-1; // not a hex digit
}
-inline bool isValid(sal_Bool const * pCharClass, sal_uInt32 nUtf32)
+bool isValid(sal_Bool const * pCharClass, sal_uInt32 nUtf32)
{
return nUtf32 < nCharClassSize && pCharClass[nUtf32];
}
-inline void writeUnicode(rtl_uString ** pBuffer, sal_Int32 * pCapacity,
+void writeUnicode(rtl_uString ** pBuffer, sal_Int32 * pCapacity,
sal_Unicode cChar)
{
rtl_uStringbuffer_insert(pBuffer, pCapacity, (*pBuffer)->length, &cChar, 1);
@@ -339,10 +339,10 @@ struct Component
bool isPresent() const { return pBegin != nullptr; }
- inline sal_Int32 getLength() const;
+ sal_Int32 getLength() const;
};
-inline sal_Int32 Component::getLength() const
+sal_Int32 Component::getLength() const
{
assert(isPresent()); // taking length of non-present component
return static_cast< sal_Int32 >(pEnd - pBegin);