diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-11 15:51:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-12 12:46:45 +0200 |
commit | d4d37662b090cb237585156a47cd8e1f1cbe2656 (patch) | |
tree | 70e59ca62b055d7e49325a268d952e0ea057b2e9 /sal/osl | |
parent | f2e65b3dbcd4c0ca91781067255854a0c5141d60 (diff) |
loplugin:constfields in reportdesign,sal,sax
and improve the rewriter so I spend less time fixing formatting
Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514
Reviewed-on: https://gerrit.libreoffice.org/61676
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl')
-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/osl/unx/thread.cxx | 12 |
9 files changed, 18 insertions, 18 deletions
diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index 9edeef9fd7d9..07a315f36be2 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -30,7 +30,7 @@ struct FreeGuard { ~FreeGuard() { std::free(buffer); } - char ** buffer; + char ** const buffer; }; } diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 71f53470dd0e..c3c5cd7fd655 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -69,7 +69,7 @@ struct FileHandle_Impl KIND_FD = 1, KIND_MEM = 2 }; - int m_kind; + int const m_kind; /** State */ enum StateBits @@ -144,7 +144,7 @@ struct FileHandle_Impl class Guard { - pthread_mutex_t *m_mutex; + pthread_mutex_t * const 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 f0718e236f6f..de7a450e478d 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_uString * m_ustrFilePath; /* holds native file name */ - unsigned char m_DType; + rtl_uString * const m_ustrFilePath; /* holds native file name */ + unsigned char const m_DType; explicit DirectoryItem_Impl( rtl_uString * ustrFilePath, unsigned char DType = 0); diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index 89969c1c40af..923b588a20c9 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -211,7 +211,7 @@ private: } private: - rtl::OUString m_path_list; + rtl::OUString const 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 428bfec90e3f..8e6f30f839d1 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -724,7 +724,7 @@ namespace { class UnicodeToTextConverter_Impl { - rtl_UnicodeToTextConverter m_converter; + rtl_UnicodeToTextConverter const m_converter; UnicodeToTextConverter_Impl() : m_converter (rtl_createUnicodeToTextConverter (osl_getThreadTextEncoding())) @@ -776,7 +776,7 @@ namespace { class TextToUnicodeConverter_Impl { - rtl_TextToUnicodeConverter m_converter; + rtl_TextToUnicodeConverter const 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 1c470b7fe3cd..feeca628762f 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -43,7 +43,7 @@ static oslPipe osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Op static struct { - int errcode; + int const errcode; oslPipeError error; } PipeError[]= { { 0, osl_Pipe_E_None }, /* no error */ diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index c742634fc190..3ea564e14736 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -78,7 +78,7 @@ extern "C" using Handler1 = void (*)(int); extern "C" using Handler2 = void (*)(int, siginfo_t *, void *); struct SignalAction { - int Signal; + int const 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 b73ce1966847..05a6234f64df 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -201,8 +201,8 @@ static const sal_uInt32 SocketDirection[]= { static const struct { - int errcode; - oslSocketError error; + int const errcode; + oslSocketError const error; } SocketError[]= { { 0, osl_Socket_E_None }, /* no error */ { ENOTSOCK, osl_Socket_E_NotSocket }, /* Socket operation on non-socket */ diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 1cac41ce717b..a47ab7d317c5 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -87,11 +87,11 @@ typedef struct osl_thread_impl_st struct osl_thread_priority_st { - int m_Highest; - int m_Above_Normal; - int m_Normal; - int m_Below_Normal; - int m_Lowest; + int const m_Highest; + int const m_Above_Normal; + int const m_Normal; + int const m_Below_Normal; + int const m_Lowest; }; #define OSL_THREAD_PRIORITY_INITIALIZER { 127, 96, 64, 32, 0 } @@ -109,7 +109,7 @@ static void osl_thread_textencoding_init_Impl(); struct osl_thread_global_st { pthread_once_t m_once; - struct osl_thread_priority_st m_priority; + struct osl_thread_priority_st const m_priority; struct osl_thread_textencoding_st m_textencoding; }; |