vcl/qt5/QtTransferable.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 19f204a30de56f0c55a157cb040f2e4bdcbe62e5
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon May 16 17:14:07 2022 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue May 17 08:22:01 2022 +0200

    qt: Drop unnecessary reinterpret_cast
    
    `OString::getStr` already returns `const char *`,
    so there's no need to cast to that.
    
    Change-Id: Ief787f9823ffea075882658cf0adec29a8030199
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134455
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtTransferable.cxx b/vcl/qt5/QtTransferable.cxx
index 806f57426255..db52eed66d0b 100644
--- a/vcl/qt5/QtTransferable.cxx
+++ b/vcl/qt5/QtTransferable.cxx
@@ -331,14 +331,12 @@ QVariant QtMimeData::retrieveData(const QString& 
mimeType, QMetaType) const
         if (bWantUTF8)
         {
             OString aUTF8String(OUStringToOString(aString, 
RTL_TEXTENCODING_UTF8));
-            aByteArray = QByteArray(reinterpret_cast<const 
char*>(aUTF8String.getStr()),
-                                    aUTF8String.getLength());
+            aByteArray = QByteArray(aUTF8String.getStr(), 
aUTF8String.getLength());
         }
         else if (bWantNoCharset)
         {
             OString aLocaleString(OUStringToOString(aString, 
osl_getThreadTextEncoding()));
-            aByteArray = QByteArray(reinterpret_cast<const 
char*>(aLocaleString.getStr()),
-                                    aLocaleString.getLength());
+            aByteArray = QByteArray(aLocaleString.getStr(), 
aLocaleString.getLength());
         }
         else
             return QVariant(toQString(aString));

Reply via email to