diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-03-26 08:34:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-03-26 09:13:55 +0100 |
commit | 1ebeacb20ad0165e399629fcfd7795ad0da3edf8 (patch) | |
tree | 480a481dd1ae32a1b75ee881f8ed19ed2dbb1201 /vcl | |
parent | 9936f3ed49e2aaf06e30b733b26d9d7f427746ed (diff) |
Extend loplugin:cstylecast to certain function-style casts
...that are equivalent to const_cast or reinterpret_cast, and should arguably
better be written that way for clarity. Drawing inspiration from
<https://reviews.llvm.org/D76572> "Replace `T(x)` with `reinterpret_cast<T>(x)`
everywhere it means reinterpret_cast. No functional change".
Change-Id: I27b8f70d324d32ecba658db4d1c2db03e10d5d3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/svmain.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index ec8dbca95d0c..9d861a5cadc6 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -453,7 +453,7 @@ void DeInitVCL() aBuf.append( "\" type = \"" ); aBuf.append( typeid(*pWin).name() ); aBuf.append( "\", ptr = 0x" ); - aBuf.append( sal_Int64( pWin ), 16 ); + aBuf.append( reinterpret_cast<sal_Int64>( pWin ), 16 ); aBuf.append( "\n" ); } } diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 46fa3b9cf03a..6436c23d71ab 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -8262,9 +8262,9 @@ private: if (bContinue && !sText.isEmpty()) { OString sFinalText(OUStringToOString(sText, RTL_TEXTENCODING_UTF8)); - g_signal_handlers_block_by_func(pEntry, gpointer(signalInsertText), this); + g_signal_handlers_block_by_func(pEntry, reinterpret_cast<gpointer>(signalInsertText), this); gtk_editable_insert_text(GTK_EDITABLE(pEntry), sFinalText.getStr(), sFinalText.getLength(), position); - g_signal_handlers_unblock_by_func(pEntry, gpointer(signalInsertText), this); + g_signal_handlers_unblock_by_func(pEntry, reinterpret_cast<gpointer>(signalInsertText), this); } g_signal_stop_emission_by_name(pEntry, "insert-text"); } @@ -12286,9 +12286,9 @@ private: if (bContinue && !sText.isEmpty()) { OString sFinalText(OUStringToOString(sText, RTL_TEXTENCODING_UTF8)); - g_signal_handlers_block_by_func(pEntry, gpointer(signalEntryInsertText), this); + g_signal_handlers_block_by_func(pEntry, reinterpret_cast<gpointer>(signalEntryInsertText), this); gtk_editable_insert_text(GTK_EDITABLE(pEntry), sFinalText.getStr(), sFinalText.getLength(), position); - g_signal_handlers_unblock_by_func(pEntry, gpointer(signalEntryInsertText), this); + g_signal_handlers_unblock_by_func(pEntry, reinterpret_cast<gpointer>(signalEntryInsertText), this); } g_signal_stop_emission_by_name(pEntry, "insert-text"); } |