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 /sal | |
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 'sal')
-rw-r--r-- | sal/osl/all/debugbase.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file_path_helper.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 22 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 40 | ||||
-rw-r--r-- | sal/qa/osl/module/osl_Module.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_process.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/process/rtl_Process.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/alloc_arena.cxx | 10 | ||||
-rw-r--r-- | sal/rtl/bootstrap.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/math.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/strtmpl.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/uri.cxx | 10 |
15 files changed, 59 insertions, 59 deletions
diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx index 91486be50ecf..fe5affc9d069 100644 --- a/sal/osl/all/debugbase.cxx +++ b/sal/osl/all/debugbase.cxx @@ -51,7 +51,7 @@ struct StaticDebugBaseAddressFilter } }; -inline bool isSubStr( char const* pStr, rtl::OString const& subStr ) +bool isSubStr( char const* pStr, rtl::OString const& subStr ) { return rtl_str_indexOfStr( pStr, subStr.getStr() ) >= 0; } diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index cff84e395561..89969c1c40af 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -28,13 +28,13 @@ const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/'; const sal_Unicode FPH_CHAR_DOT = '.'; const sal_Unicode FPH_CHAR_COLON = ':'; -static inline const rtl::OUString FPH_PATH_SEPARATOR() +static const rtl::OUString FPH_PATH_SEPARATOR() { return rtl::OUString(FPH_CHAR_PATH_SEPARATOR); } -static inline const rtl::OUString FPH_LOCAL_DIR_ENTRY() +static const rtl::OUString FPH_LOCAL_DIR_ENTRY() { return rtl::OUString(FPH_CHAR_DOT); } -static inline const rtl::OUString FPH_PARENT_DIR_ENTRY() +static const rtl::OUString FPH_PARENT_DIR_ENTRY() { return rtl::OUString(".."); } void osl_systemPathRemoveSeparator(rtl_uString* pustrPath) diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 2b960d017fea..7ba3d90a7037 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -36,7 +36,7 @@ namespace { - inline void set_file_type(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_type(const struct stat& file_stat, oslFileStatus* pStat) { /* links to directories state also to be a directory */ if (S_ISLNK(file_stat.st_mode)) @@ -57,7 +57,7 @@ namespace pStat->uValidFields |= osl_FileStatus_Mask_Type; } - inline void set_file_access_mask(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_access_mask(const struct stat& file_stat, oslFileStatus* pStat) { // user permissions if (S_IRUSR & file_stat.st_mode) @@ -99,7 +99,7 @@ namespace required on network file systems not using unix semantics (AFS, see fdo#43095). */ - inline void set_file_access_rights(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_access_rights(const rtl::OUString& file_path, oslFileStatus* pStat) { pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -110,7 +110,7 @@ namespace pStat->uAttributes |= osl_File_Attribute_Executable; } - inline void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) + void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) { pStat->uAttributes = osl::systemPathIsHiddenFileOrDirectoryEntry(file_path) ? osl_File_Attribute_Hidden : 0; pStat->uValidFields |= osl_FileStatus_Mask_Attributes; @@ -118,7 +118,7 @@ namespace /* the set_file_access_rights must be called after set_file_hidden_status(...) and set_file_access_mask(...) because of the hack in set_file_access_rights(...) */ - inline void set_file_attributes( + void set_file_attributes( const rtl::OUString& file_path, const struct stat& file_stat, const sal_uInt32 uFieldMask, oslFileStatus* pStat) { set_file_hidden_status(file_path, pStat); @@ -130,21 +130,21 @@ namespace set_file_access_rights(file_path, pStat); } - inline void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat) { pStat->aAccessTime.Seconds = file_stat.st_atime; pStat->aAccessTime.Nanosec = 0; pStat->uValidFields |= osl_FileStatus_Mask_AccessTime; } - inline void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) { pStat->aModifyTime.Seconds = file_stat.st_mtime; pStat->aModifyTime.Nanosec = 0; pStat->uValidFields |= osl_FileStatus_Mask_ModifyTime; } - inline void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) + void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) { if (S_ISREG(file_stat.st_mode)) { @@ -155,7 +155,7 @@ namespace /* we only need to call stat or lstat if one of the following flags is set */ - inline bool is_stat_call_necessary(sal_uInt32 field_mask, oslFileType file_type) + bool is_stat_call_necessary(sal_uInt32 field_mask, oslFileType file_type) { return ( ((field_mask & osl_FileStatus_Mask_Type) && (file_type == osl_File_Type_Unknown)) || @@ -168,7 +168,7 @@ namespace (field_mask & osl_FileStatus_Mask_Validate)); } - inline oslFileError set_link_target_url(const rtl::OUString& file_path, oslFileStatus* pStat) + oslFileError set_link_target_url(const rtl::OUString& file_path, oslFileStatus* pStat) { rtl::OUString link_target; if (!osl::realpath(file_path, link_target)) @@ -182,7 +182,7 @@ namespace return osl_File_E_None; } - inline oslFileError setup_osl_getFileStatus( + oslFileError setup_osl_getFileStatus( DirectoryItem_Impl * pImpl, oslFileStatus* pStat, rtl::OUString& file_path) { if ((pImpl == nullptr) || (pStat == nullptr)) diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index a6b80daa9e2a..a6dd0954bf41 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -29,7 +29,7 @@ #include <osl/detail/android-bootstrap.h> #endif -static inline rtl::OString OUStringToOString(const rtl_uString* s) +static rtl::OString OUStringToOString(const rtl_uString* s) { return rtl::OUStringToOString(rtl::OUString(const_cast<rtl_uString*>(s)), osl_getThreadTextEncoding()); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index bd3729513f7d..fcc8c41cf4ab 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -43,7 +43,7 @@ using namespace osl; /** detailed wrong message. */ -static inline OString errorToString(const osl::FileBase::RC _nError) +static OString errorToString(const osl::FileBase::RC _nError) { OString sResult; switch (_nError) { @@ -103,7 +103,7 @@ static OString errorToStr(osl::FileBase::RC const& nError) # define delta 1800 // time precision, 1.8s #endif -static inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta) +static bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime, sal_Int32 nDelta) { sal_Int32 nDeltaSeconds = m_aEndTime->Seconds - m_aStartTime->Seconds; sal_Int32 nDeltaNanoSec = sal_Int32(m_aEndTime->Nanosec) - sal_Int32(m_aStartTime->Nanosec); @@ -119,7 +119,7 @@ static inline bool t_compareTime(TimeValue *m_aEndTime, TimeValue *m_aStartTime /** compare two OUString file name. */ -static inline bool compareFileName(const OUString & ustr1, const OUString & ustr2) +static bool compareFileName(const OUString & ustr1, const OUString & ustr2) { bool bOk; // on Windows, the separator is '\', so here change to '/', then compare @@ -145,14 +145,14 @@ static inline bool compareFileName(const OUString & ustr1, const OUString & ustr /** simple version to judge if a file name or directory name is a URL or a system path, just to see if it is start with "file:///";. */ -static inline bool isURL(const OUString& pathname) +static bool isURL(const OUString& pathname) { return pathname.startsWith(aPreURL); } /** concat two part to form a URL or system path, add PATH_SEPARATOR between them if necessary, add "file:///" to beginning if necessary. */ -static inline void concatURL(OUString & pathname1, const OUString & pathname2) +static void concatURL(OUString & pathname1, const OUString & pathname2) { // check if pathname1 is full qualified URL; if (!isURL(pathname1)) @@ -170,7 +170,7 @@ static inline void concatURL(OUString & pathname1, const OUString & pathname2) /** create a temp test file using OUString name of full qualified URL or system path. */ -static inline void createTestFile(const OUString& filename) +static void createTestFile(const OUString& filename) { OUString aPathURL = filename.copy(0); osl::FileBase::RC nError; @@ -189,7 +189,7 @@ static inline void createTestFile(const OUString& filename) /** create a temp test file using OUString name of full qualified URL or system path in a base directory. */ -static inline void createTestFile(const OUString& basename, const OUString& filename) +static void createTestFile(const OUString& basename, const OUString& filename) { OUString aBaseURL = basename.copy(0); @@ -199,7 +199,7 @@ static inline void createTestFile(const OUString& basename, const OUString& file /** delete a temp test file using OUString name. */ -static inline void deleteTestFile(const OUString& filename) +static void deleteTestFile(const OUString& filename) { OUString aPathURL = filename.copy(0); osl::FileBase::RC nError; @@ -216,7 +216,7 @@ static inline void deleteTestFile(const OUString& filename) /** delete a temp test file using OUString name of full qualified URL or system path in a base directory. */ -static inline void deleteTestFile(const OUString& basename, const OUString& filename) +static void deleteTestFile(const OUString& basename, const OUString& filename) { OUString aBaseURL = basename.copy(0); @@ -226,7 +226,7 @@ static inline void deleteTestFile(const OUString& basename, const OUString& file /** create a temp test directory using OUString name of full qualified URL or system path. */ -static inline void createTestDirectory(const OUString& dirname) +static void createTestDirectory(const OUString& dirname) { OUString aPathURL = dirname.copy(0); osl::FileBase::RC nError; @@ -240,7 +240,7 @@ static inline void createTestDirectory(const OUString& dirname) /** create a temp test directory using OUString name of full qualified URL or system path in a base directory. */ -static inline void createTestDirectory(const OUString& basename, const OUString& dirname) +static void createTestDirectory(const OUString& basename, const OUString& dirname) { OUString aBaseURL = basename.copy(0); @@ -250,7 +250,7 @@ static inline void createTestDirectory(const OUString& basename, const OUString& /** delete a temp test directory using OUString name of full qualified URL or system path. */ -static inline void deleteTestDirectory(const OUString& dirname) +static void deleteTestDirectory(const OUString& dirname) { OUString aPathURL = dirname.copy(0); osl::FileBase::RC nError; @@ -270,7 +270,7 @@ static inline void deleteTestDirectory(const OUString& dirname) /** delete a temp test directory using OUString name of full qualified URL or system path in a base directory. */ -static inline void deleteTestDirectory(const OUString& basename, const OUString& dirname) +static void deleteTestDirectory(const OUString& basename, const OUString& dirname) { OUString aBaseURL = basename.copy(0); @@ -288,7 +288,7 @@ enum class oslCheckMode { /** check if the file exist */ -static inline bool ifFileExist(const OUString & str) +static bool ifFileExist(const OUString & str) { File testFile(str); return (testFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None); @@ -296,7 +296,7 @@ static inline bool ifFileExist(const OUString & str) /** check if the file can be written */ -static inline bool ifFileCanWrite(const OUString & str) +static bool ifFileCanWrite(const OUString & str) { // on Windows, the file has no write right, but can be written #ifdef _WIN32 @@ -317,7 +317,7 @@ static inline bool ifFileCanWrite(const OUString & str) return bCheckResult; } -static inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) +static bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) { OUString aUString; DirectoryItem rItem; @@ -366,7 +366,7 @@ static inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) /** construct error message */ -static inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") +static OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") { OString aString; if (returnVal == rightVal) @@ -384,7 +384,7 @@ static inline OString outputError(const OString & returnVal, const OString & rig /** Change file mode, two version in UNIX and Windows;. */ #if (defined UNX) /* chmod() method is different in Windows */ -static inline void changeFileMode(OUString & filepath, sal_Int32 mode) +static void changeFileMode(OUString & filepath, sal_Int32 mode) { OString aString; OUString aUStr = filepath.copy(0); @@ -405,7 +405,7 @@ inline void changeFileMode(OUString & filepath, sal_Int32 mode) } #endif -static inline OUString getCurrentPID(); +static OUString getCurrentPID(); // Beginning of the test cases for osl::FileBase class @@ -5133,7 +5133,7 @@ namespace osl_Directory /** get Current PID. */ -inline OUString getCurrentPID() +OUString getCurrentPID() { //~ Get current PID and turn it into OUString; int nPID = 0; diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 04af99487f85..9910925e3c5a 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -27,7 +27,7 @@ using ::rtl::OUString; /** get dll file URL. */ -static inline ::rtl::OUString getDllURL() +static ::rtl::OUString getDllURL() { #if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name. ::rtl::OUString libPath( "test_Module_DLL.dll" ); diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index 74f45b2faa21..683cbf83f2ce 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -44,7 +44,7 @@ using ::rtl::OString; /** print last error of pipe system. */ -static inline void printPipeError( ::osl::Pipe const & aPipe ) +static void printPipeError( ::osl::Pipe const & aPipe ) { oslPipeError nError = aPipe.getError( ); printf("#printPipeError# " ); diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 8b99d7089b99..47d0eeba4d0c 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -71,7 +71,7 @@ using ::rtl::OString; /** get binary Path. */ -static inline ::rtl::OUString getExecutablePath() +static ::rtl::OUString getExecutablePath() { ::rtl::OUString dirPath; osl::Module::getUrlFromAddress( diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index cba8b125bb17..85b0e8f0fb0b 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -38,7 +38,7 @@ using namespace rtl; /** print a UNI_CODE String. */ -static inline void printUString( const ::rtl::OUString & str ) +static void printUString( const ::rtl::OUString & str ) { rtl::OString aString; diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 07c7059bbc56..ab3b8433d4c3 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -43,7 +43,7 @@ using ::rtl::OUStringToOString; /** print a UNI_CODE String. And also print some comments of the string. */ -static inline void printUString( const ::rtl::OUString & str, const sal_Char * msg ) +static void printUString( const ::rtl::OUString & str, const sal_Char * msg ) { if ( msg != nullptr ) { @@ -54,7 +54,7 @@ static inline void printUString( const ::rtl::OUString & str, const sal_Char * m printf("%s\n", aString.getStr( ) ); } -static inline ::rtl::OUString getModulePath() +static ::rtl::OUString getModulePath() { ::rtl::OUString suDirPath; ::osl::Module::getUrlFromAddress( 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); |