diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-12 08:55:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-12 09:22:20 +0100 |
commit | b480819dc4133f587eb960143128a7d85a44da9a (patch) | |
tree | b7677157cbae13afc4c87e4621545bffbc61c726 /sal | |
parent | b271cc46851c61ddef20dc869bf339c857f76b18 (diff) |
Revert "loplugin:constfields in reportdesign,sal,sax"
This reverts commit d4d37662b090cb237585156a47cd8e1f1cbe2656.
Now that we know that making fields has negative side effects
like disabling assignment operator generation.
Change-Id: Idef4937b89a83d2efbfaf0ab87d059a0143c0164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/backtraceapi.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_impl.hxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_path_helper.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file_url.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/pipe.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/signal.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/condition/osl_Condition.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_convert.cxx | 8 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_endswith.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/bootstrap.cxx | 4 | ||||
-rw-r--r-- | sal/textenc/convertbig5hkscs.hxx | 2 | ||||
-rw-r--r-- | sal/textenc/convertgb18030.hxx | 16 | ||||
-rw-r--r-- | sal/textenc/convertsimple.cxx | 8 | ||||
-rw-r--r-- | sal/textenc/convertsinglebytetobmpunicode.hxx | 10 | ||||
-rw-r--r-- | sal/textenc/tenchelp.hxx | 94 | ||||
-rw-r--r-- | sal/textenc/tencinfo.cxx | 2 |
19 files changed, 89 insertions, 89 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 3e2cdd512e68..a760ecf8ff41 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -196,7 +196,7 @@ struct test_name_compare return nEndPos == maName.size(); } - std::string const maName; + std::string maName; }; bool addRecursiveTests(const std::vector<std::string>& test_names, CppUnit::Test* pTest, CppUnit::TestRunner& rRunner) diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index 93ca94da5ff2..d11128353d47 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -30,7 +30,7 @@ struct FreeGuard { ~FreeGuard() { std::free(buffer); } - char ** const buffer; + char ** buffer; }; } diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index aa293f914d74..d8396f6279b6 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -89,7 +89,7 @@ struct FileHandle_Impl KIND_FD = 1, KIND_MEM = 2 }; - int const m_kind; + int m_kind; /** State */ State m_state; @@ -161,7 +161,7 @@ struct FileHandle_Impl class Guard { - pthread_mutex_t * const m_mutex; + pthread_mutex_t *m_mutex; public: explicit Guard(pthread_mutex_t *pMutex); diff --git a/sal/osl/unx/file_impl.hxx b/sal/osl/unx/file_impl.hxx index eadb1257a068..ed8a93ea5c9d 100644 --- a/sal/osl/unx/file_impl.hxx +++ b/sal/osl/unx/file_impl.hxx @@ -28,8 +28,8 @@ struct DirectoryItem_Impl { sal_Int32 m_RefCount; - rtl_String * const m_strFilePath; /* holds native file name */ - unsigned char const m_DType; + rtl_String * m_strFilePath; /* holds native file name */ + unsigned char m_DType; explicit DirectoryItem_Impl( rtl_String * strFilePath, unsigned char DType = 0); diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index 163deb0c2493..a0ef13f9503d 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -220,7 +220,7 @@ private: } private: - OUString const m_path_list; + OUString m_path_list; const sal_Unicode* m_end; const sal_Unicode m_separator; const sal_Unicode* m_path_segment_begin; diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 9dade1c3f09a..5e99d5306cdc 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -110,7 +110,7 @@ namespace { class UnicodeToTextConverter_Impl { - rtl_UnicodeToTextConverter const m_converter; + rtl_UnicodeToTextConverter m_converter; UnicodeToTextConverter_Impl() : m_converter (rtl_createUnicodeToTextConverter (osl_getThreadTextEncoding())) @@ -865,7 +865,7 @@ namespace { class TextToUnicodeConverter_Impl { - rtl_TextToUnicodeConverter const m_converter; + rtl_TextToUnicodeConverter m_converter; TextToUnicodeConverter_Impl() : m_converter (rtl_createTextToUnicodeConverter (osl_getThreadTextEncoding())) diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index 153db04d99fa..ec9fe4b9d5ca 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -43,7 +43,7 @@ static oslPipe osl_psz_createPipe(const char *pszPipeName, oslPipeOptions Option static struct { - int const errcode; + int errcode; oslPipeError error; } const PipeError[]= { { 0, osl_Pipe_E_None }, /* no error */ diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index 55d09b4f6249..00c3ca3f522e 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -77,7 +77,7 @@ extern "C" using Handler1 = void (*)(int); extern "C" using Handler2 = void (*)(int, siginfo_t *, void *); struct SignalAction { - int const Signal; + int Signal; int Action; Handler1 Handler; bool siginfo; // Handler's type is Handler2 diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index d3b192f4e1f1..239a8dcb248d 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -207,8 +207,8 @@ static const sal_uInt32 SocketDirection[]= { static const struct { - int const errcode; - oslSocketError const error; + int errcode; + oslSocketError error; } SocketError[]= { { 0, osl_Socket_E_None }, /* no error */ { ENOTSOCK, osl_Socket_E_NotSocket }, /* Socket operation on non-socket */ diff --git a/sal/qa/osl/condition/osl_Condition.cxx b/sal/qa/osl/condition/osl_Condition.cxx index 0e6a56f37c3b..05b7fc661f6a 100644 --- a/sal/qa/osl/condition/osl_Condition.cxx +++ b/sal/qa/osl/condition/osl_Condition.cxx @@ -41,7 +41,7 @@ public: protected: ::osl::Condition& m_MyCon; - ConditionType const m_MyType; + ConditionType m_MyType; void SAL_CALL run() override { diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx index cfae69f0012a..bfd1a2aac784 100644 --- a/sal/qa/rtl/strings/test_oustring_convert.cxx +++ b/sal/qa/rtl/strings/test_oustring_convert.cxx @@ -45,10 +45,10 @@ namespace { struct TestConvertToString { - sal_Unicode const aSource[100]; - sal_Int32 const nLength; - rtl_TextEncoding const nEncoding; - sal_uInt32 const nFlags; + sal_Unicode aSource[100]; + sal_Int32 nLength; + rtl_TextEncoding nEncoding; + sal_uInt32 nFlags; char const * pStrict; char const * pRelaxed; }; diff --git a/sal/qa/rtl/strings/test_oustring_endswith.cxx b/sal/qa/rtl/strings/test_oustring_endswith.cxx index 7649de312f81..bf01577e28be 100644 --- a/sal/qa/rtl/strings/test_oustring_endswith.cxx +++ b/sal/qa/rtl/strings/test_oustring_endswith.cxx @@ -71,10 +71,10 @@ void test::oustring::EndsWith::endsWith() { struct Data { char const * str1; - sal_Int32 const str1Len; + sal_Int32 str1Len; char const * str2; - sal_Int32 const str2Len; - bool const endsWith; + sal_Int32 str2Len; + bool endsWith; }; Data const data[] = { { RTL_CONSTASCII_STRINGPARAM(""), RTL_CONSTASCII_STRINGPARAM(""), diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index dae54a88df66..97cbd1f79e0a 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -88,7 +88,7 @@ enum LookupMode { struct ExpandRequestLink { ExpandRequestLink const * next; Bootstrap_Impl const * file; - OUString const key; + OUString key; }; OUString expandMacros( @@ -289,7 +289,7 @@ struct Bootstrap_Impl Bootstrap_Impl * _base_ini; NameValueVector _nameValueVector; - OUString const _iniName; + OUString _iniName; explicit Bootstrap_Impl (OUString const & rIniName); ~Bootstrap_Impl(); diff --git a/sal/textenc/convertbig5hkscs.hxx b/sal/textenc/convertbig5hkscs.hxx index 1a2d1d689e47..089ac5845c95 100644 --- a/sal/textenc/convertbig5hkscs.hxx +++ b/sal/textenc/convertbig5hkscs.hxx @@ -34,7 +34,7 @@ struct ImplBig5HkscsConverterData sal_Int32 const * m_pUnicodeToBig5Hkscs2001PlaneOffsets; ImplUniToDBCSHighTab const * m_pUnicodeToBig5Data; ImplDBCSEUDCData const * m_pEudcData; - int const m_nEudcCount; + int m_nEudcCount; }; void * ImplCreateBig5HkscsToUnicodeContext(); diff --git a/sal/textenc/convertgb18030.hxx b/sal/textenc/convertgb18030.hxx index d3b3621dab24..680384794eb4 100644 --- a/sal/textenc/convertgb18030.hxx +++ b/sal/textenc/convertgb18030.hxx @@ -26,18 +26,18 @@ struct ImplGb180302000ToUnicodeRange { - sal_Int32 const m_nNonRangeDataIndex; - sal_uInt32 const m_nFirstLinear; - sal_uInt32 const m_nPastLinear; - sal_Unicode const m_nFirstUnicode; + sal_Int32 m_nNonRangeDataIndex; + sal_uInt32 m_nFirstLinear; + sal_uInt32 m_nPastLinear; + sal_Unicode m_nFirstUnicode; }; struct ImplUnicodeToGb180302000Range { - sal_Int32 const m_nNonRangeDataIndex; - sal_Unicode const m_nFirstUnicode; - sal_Unicode const m_nLastUnicode; - sal_uInt32 const m_nFirstLinear; + sal_Int32 m_nNonRangeDataIndex; + sal_Unicode m_nFirstUnicode; + sal_Unicode m_nLastUnicode; + sal_uInt32 m_nFirstLinear; }; struct ImplGb18030ConverterData diff --git a/sal/textenc/convertsimple.cxx b/sal/textenc/convertsimple.cxx index 9e4950edbac1..ab4e136ef711 100644 --- a/sal/textenc/convertsimple.cxx +++ b/sal/textenc/convertsimple.cxx @@ -22,8 +22,8 @@ namespace { struct ImplReplaceCharData { - sal_uInt16 const mnUniChar; - sal_uInt16 const mnReplaceChar; + sal_uInt16 mnUniChar; + sal_uInt16 mnReplaceChar; }; static ImplReplaceCharData const aImplRepCharTab[] = @@ -353,8 +353,8 @@ sal_uInt16 ImplGetReplaceChar( sal_Unicode c ) struct ImplReplaceCharStrData { - sal_uInt16 const mnUniChar; - sal_uInt16 const maReplaceChars[IMPL_MAX_REPLACECHAR]; + sal_uInt16 mnUniChar; + sal_uInt16 maReplaceChars[IMPL_MAX_REPLACECHAR]; }; static ImplReplaceCharStrData const aImplRepCharStrTab[] = diff --git a/sal/textenc/convertsinglebytetobmpunicode.hxx b/sal/textenc/convertsinglebytetobmpunicode.hxx index aef3f627192c..7673228a4615 100644 --- a/sal/textenc/convertsinglebytetobmpunicode.hxx +++ b/sal/textenc/convertsinglebytetobmpunicode.hxx @@ -40,7 +40,7 @@ struct BmpUnicodeToSingleByteRange { /** The start of the range of BMP Unicode code points. */ - sal_Unicode const unicode; + sal_Unicode unicode; /** The extend of the range of BMP Unicode code points. @@ -49,7 +49,7 @@ struct BmpUnicodeToSingleByteRange { inclusive. It is an error if <code>unicode + range</code> is greater than <code>0xFFFF</code>.</p> */ - sal_uInt8 const range; + sal_uInt8 range; /** The start of the corresponding range of individual bytes. @@ -57,7 +57,7 @@ struct BmpUnicodeToSingleByteRange { <p>It is an error if <code>byte + range</code> is greater than <code>0xFF</code>.</p> */ - sal_uInt8 const byte; + sal_uInt8 byte; }; /** @@ -77,12 +77,12 @@ struct BmpUnicodeToSingleByteConverterData { <p>Illegal units from the single-byte character set are mapped to <code>0xFFFF</code>.</p> */ - sal_Unicode const byteToUnicode[256]; + sal_Unicode byteToUnicode[256]; /** The number of Unicode-to-byte conversion ranges. */ - std::size_t const unicodeToByteEntries; + std::size_t unicodeToByteEntries; /** The array of Unicode-to-byte conversion ranges, sorted by increasing diff --git a/sal/textenc/tenchelp.hxx b/sal/textenc/tenchelp.hxx index 655641ab606c..901156730da5 100644 --- a/sal/textenc/tenchelp.hxx +++ b/sal/textenc/tenchelp.hxx @@ -73,14 +73,14 @@ typedef void (* ImplResetUnicodeContextProc)(void * pContext); struct ImplTextConverter { void const * mpConvertData; - ImplConvertToUnicodeProc const mpConvertTextToUnicodeProc; - ImplConvertToTextProc const mpConvertUnicodeToTextProc; - ImplCreateTextContextProc const mpCreateTextToUnicodeContext; - ImplDestroyTextContextProc const mpDestroyTextToUnicodeContext; - ImplResetTextContextProc const mpResetTextToUnicodeContext; - ImplCreateUnicodeContextProc const mpCreateUnicodeToTextContext; - ImplDestroyUnicodeContextProc const mpDestroyUnicodeToTextContext; - ImplResetUnicodeContextProc const mpResetUnicodeToTextContext; + ImplConvertToUnicodeProc mpConvertTextToUnicodeProc; + ImplConvertToTextProc mpConvertUnicodeToTextProc; + ImplCreateTextContextProc mpCreateTextToUnicodeContext; + ImplDestroyTextContextProc mpDestroyTextToUnicodeContext; + ImplResetTextContextProc mpResetTextToUnicodeContext; + ImplCreateUnicodeContextProc mpCreateUnicodeToTextContext; + ImplDestroyUnicodeContextProc mpDestroyUnicodeToTextContext; + ImplResetUnicodeContextProc mpResetUnicodeToTextContext; }; /* ----------------------------- */ @@ -90,13 +90,13 @@ struct ImplTextConverter struct SAL_DLLPUBLIC_RTTI ImplTextEncodingData { ImplTextConverter maConverter; - sal_uInt8 const mnMinCharSize; - sal_uInt8 const mnMaxCharSize; - sal_uInt8 const mnAveCharSize; - sal_uInt8 const mnBestWindowsCharset; + sal_uInt8 mnMinCharSize; + sal_uInt8 mnMaxCharSize; + sal_uInt8 mnAveCharSize; + sal_uInt8 mnBestWindowsCharset; char const * mpBestUnixCharset; char const * mpBestMimeCharset; - sal_uInt32 const mnInfoFlags; + sal_uInt32 mnInfoFlags; }; /* ----------------------------------- */ @@ -105,9 +105,9 @@ struct SAL_DLLPUBLIC_RTTI ImplTextEncodingData struct ImplUniCharTabData { - sal_uInt16 const mnUniChar; - unsigned char const mnChar; - unsigned char const mnChar2; + sal_uInt16 mnUniChar; + unsigned char mnChar; + unsigned char mnChar2; // to cater for mappings like MS1258 with 1--2 bytes per Unicode char, // 0 if unused }; @@ -116,18 +116,18 @@ struct ImplByteConvertData { const sal_uInt16* mpToUniTab1; const sal_uInt16* mpToUniTab2; - unsigned char const mnToUniStart1; - unsigned char const mnToUniEnd1; - unsigned char const mnToUniStart2; - unsigned char const mnToUniEnd2; + unsigned char mnToUniStart1; + unsigned char mnToUniEnd1; + unsigned char mnToUniStart2; + unsigned char mnToUniEnd2; const unsigned char* mpToCharTab1; const unsigned char* mpToCharTab2; const ImplUniCharTabData* mpToCharExTab; - sal_uInt16 const mnToCharStart1; - sal_uInt16 const mnToCharEnd1; - sal_uInt16 const mnToCharStart2; - sal_uInt16 const mnToCharEnd2; - sal_uInt16 const mnToCharExCount; + sal_uInt16 mnToCharStart1; + sal_uInt16 mnToCharEnd1; + sal_uInt16 mnToCharStart2; + sal_uInt16 mnToCharEnd2; + sal_uInt16 mnToCharExCount; }; /* ----------------------------------- */ @@ -136,32 +136,32 @@ struct ImplByteConvertData struct ImplDBCSEUDCData { - unsigned char const mnLeadStart; - unsigned char const mnLeadEnd; - unsigned char const mnTrail1Start; - unsigned char const mnTrail1End; - unsigned char const mnTrail2Start; - unsigned char const mnTrail2End; - unsigned char const mnTrail3Start; - unsigned char const mnTrail3End; - unsigned char const mnTrailCount; - sal_uInt16 const mnTrailRangeCount; - sal_uInt16 const mnUniStart; - sal_uInt16 const mnUniEnd; + unsigned char mnLeadStart; + unsigned char mnLeadEnd; + unsigned char mnTrail1Start; + unsigned char mnTrail1End; + unsigned char mnTrail2Start; + unsigned char mnTrail2End; + unsigned char mnTrail3Start; + unsigned char mnTrail3End; + unsigned char mnTrailCount; + sal_uInt16 mnTrailRangeCount; + sal_uInt16 mnUniStart; + sal_uInt16 mnUniEnd; }; struct ImplDBCSToUniLeadTab { - sal_uInt16 const mnUniChar; - sal_uInt8 const mnTrailStart; - sal_uInt8 const mnTrailEnd; + sal_uInt16 mnUniChar; + sal_uInt8 mnTrailStart; + sal_uInt8 mnTrailEnd; const sal_uInt16* mpToUniTrailTab; }; struct ImplUniToDBCSHighTab { - sal_uInt8 const mnLowStart; - sal_uInt8 const mnLowEnd; + sal_uInt8 mnLowStart; + sal_uInt8 mnLowEnd; const sal_uInt16* mpToUniTrailTab; }; @@ -169,12 +169,12 @@ struct ImplDBCSConvertData { const ImplDBCSToUniLeadTab* mpToUniLeadTab; const ImplUniToDBCSHighTab* mpToDBCSHighTab; - unsigned char const mnLeadStart; - unsigned char const mnLeadEnd; - unsigned char const mnTrailStart; - unsigned char const mnTrailEnd; + unsigned char mnLeadStart; + unsigned char mnLeadEnd; + unsigned char mnTrailStart; + unsigned char mnTrailEnd; const ImplDBCSEUDCData* mpEUDCTab; - sal_uInt16 const mnEUDCCount; + sal_uInt16 mnEUDCCount; }; /* ---------------------------------- */ diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx index c2ee6850f515..61439b489a7c 100644 --- a/sal/textenc/tencinfo.cxx +++ b/sal/textenc/tencinfo.cxx @@ -107,7 +107,7 @@ namespace { struct ImplStrCharsetDef { const char* mpCharsetStr; - rtl_TextEncoding const meTextEncoding; + rtl_TextEncoding meTextEncoding; }; struct ImplStrFirstPartCharsetDef |