diff options
-rw-r--r-- | include/osl/thread.hxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/conditn.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_misc.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/profile.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 34 | ||||
-rw-r--r-- | sal/osl/unx/thread.cxx | 6 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/file/test_cpy_wrt_file.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/module/osl_Module.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/alloc_cache.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/cipher.cxx | 14 | ||||
-rw-r--r-- | sal/rtl/digest.cxx | 26 | ||||
-rw-r--r-- | sal/rtl/random.cxx | 6 | ||||
-rw-r--r-- | sal/textenc/textcvt.cxx | 4 |
16 files changed, 62 insertions, 62 deletions
diff --git a/include/osl/thread.hxx b/include/osl/thread.hxx index 7d786eda0b62..7b1e06ad386f 100644 --- a/include/osl/thread.hxx +++ b/include/osl/thread.hxx @@ -69,7 +69,7 @@ public: bool SAL_CALL create() { assert(m_hThread == 0); // only one running thread per instance - m_hThread = osl_createSuspendedThread( threadFunc, (void*)this); + m_hThread = osl_createSuspendedThread( threadFunc, static_cast<void*>(this)); if (m_hThread == 0) { return false; @@ -84,7 +84,7 @@ public: if( m_hThread) return false; m_hThread= osl_createSuspendedThread( threadFunc, - (void*)this); + static_cast<void*>(this)); return m_hThread != 0; } diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx index 5d4b0bb5edc8..7ff6b6a05c8a 100644 --- a/sal/osl/unx/conditn.cxx +++ b/sal/osl/unx/conditn.cxx @@ -73,7 +73,7 @@ oslCondition SAL_CALL osl_createCondition() SAL_INFO( "sal.osl.condition", "osl_createCondition(): " << pCond ); - return (oslCondition)pCond; + return static_cast<oslCondition>(pCond); } void SAL_CALL osl_destroyCondition(oslCondition Condition) diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index aa918c8d6565..09c50471e7cb 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -729,7 +729,7 @@ oslFileHandle osl::detail::createFileHandleFromFD( int fd ) } SAL_INFO("sal.file", "osl::detail::createFileHandleFromFD(" << pImpl->m_fd << ", writeable) => " << pImpl->m_strFilePath); - return (oslFileHandle)pImpl; + return static_cast<oslFileHandle>(pImpl); } static int osl_file_adjustLockFlags (const char * path, int flags) @@ -998,7 +998,7 @@ openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_uInt32 uFlags, SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << (flags & O_RDWR ? "writeable":"readonly") << ") => " << pImpl->m_fd); - *pHandle = (oslFileHandle)(pImpl); + *pHandle = static_cast<oslFileHandle>(pImpl); return osl_File_E_None; } diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index a5bfc9983688..125afeab8044 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -204,7 +204,7 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirect #ifdef ANDROID pDirImpl->eKind = oslDirectoryImpl::KIND_DIRENT; #endif - *pDirectory = (oslDirectory) pDirImpl; + *pDirectory = static_cast<oslDirectory>(pDirImpl); return osl_File_E_None; } else diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 1198e73eebed..da7ef0cef756 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -652,14 +652,14 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName, osl_destroyCondition(Data.m_started); for (i = 0; Data.m_pszArgs[i] != NULL; i++) - free((void *)Data.m_pszArgs[i]); + free(const_cast<char *>(Data.m_pszArgs[i])); for (i = 0; Data.m_pszEnv[i] != NULL; i++) - free((void *)Data.m_pszEnv[i]); + free(Data.m_pszEnv[i]); if ( Data.m_pszDir != 0 ) { - free((void *)Data.m_pszDir); + free(const_cast<char *>(Data.m_pszDir)); } osl_destroyThread(hThread); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index abffd33d105c..593808755479 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -1845,7 +1845,7 @@ static bool releaseProfile(osl_TProfileImpl* pProfile) if (pProfile->m_Flags & FLG_AUTOOPEN) { - return osl_closeProfile((oslProfile)pProfile); + return osl_closeProfile(static_cast<oslProfile>(pProfile)); } else { diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 2bc7217cd13a..614d418c43b1 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -628,7 +628,7 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( else { /* No broadcast in class D */ - return (oslSocketAddr)NULL; + return nullptr; } nAddr = htonl(nAddr); } @@ -785,21 +785,21 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) sal_Char *cn; if ((he == NULL) || (he->h_name == NULL) || (he->h_addr_list[0] == NULL)) - return (oslHostAddr)NULL; + return nullptr; if (_osl_isFullQualifiedDomainName(he->h_name)) { cn= strdup(he->h_name); SAL_WARN_IF( !cn, "sal.osl", "insufficient memory" ); if (cn == NULL) - return (oslHostAddr)NULL; + return nullptr; } else { cn =_osl_getFullQualifiedDomainName (he->h_name); SAL_WARN_IF( !cn, "sal.osl", "couldn't get full qualified domain name" ); if (cn == NULL) - return (oslHostAddr)NULL; + return nullptr; } pSockAddr = __osl_createSocketAddr(); @@ -807,7 +807,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) if (pSockAddr == NULL) { free(cn); - return (oslHostAddr)NULL; + return nullptr; } pSockAddr->m_sockaddr.sa_family= he->h_addrtype; @@ -828,7 +828,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) __osl_destroySocketAddr( pSockAddr ); free (cn); - return (oslHostAddr)NULL; + return nullptr; } pAddr= static_cast<oslHostAddr>(malloc(sizeof(struct oslHostAddrImpl))); @@ -837,7 +837,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) { __osl_destroySocketAddr( pSockAddr ); free (cn); - return (oslHostAddr)NULL; + return nullptr; } pAddr->pHostName= cn; @@ -884,19 +884,19 @@ oslHostAddr SAL_CALL osl_psz_createHostAddr ( SAL_WARN_IF( !pszHostname, "sal.osl", "undefined hostname" ); SAL_WARN_IF( !pAddr, "sal.osl", "undefined address" ); if ((pszHostname == NULL) || (pAddr == NULL)) - return (oslHostAddr)NULL; + return nullptr; cn = strdup(pszHostname); SAL_WARN_IF( !cn, "sal.osl", "insufficient memory" ); if (cn == NULL) - return (oslHostAddr)NULL; + return nullptr; pHostAddr= static_cast<oslHostAddr>(malloc(sizeof(struct oslHostAddrImpl))); SAL_WARN_IF( !pHostAddr, "sal.osl", "allocation error" ); if (pHostAddr == NULL) { free (cn); - return (oslHostAddr)NULL; + return nullptr; } pHostAddr->pHostName= cn; @@ -951,7 +951,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) SAL_WARN_IF( !pAddr, "sal.osl", "undefined address" ); if (pAddr == NULL) - return (oslHostAddr)NULL; + return nullptr; if (pAddr->m_sockaddr.sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyInet)) { @@ -959,7 +959,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) struct hostent *he; if (sin->sin_addr.s_addr == htonl(INADDR_ANY)) - return (oslHostAddr)NULL; + return nullptr; char const * addr = reinterpret_cast<char const *>(&sin->sin_addr); // at least some Androids apparently have a gethostbyaddr with char* @@ -970,7 +970,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) return _osl_hostentToHostAddr (he); } - return (oslHostAddr)NULL; + return nullptr; } oslHostAddr SAL_CALL osl_copyHostAddr (const oslHostAddr pAddr) @@ -980,7 +980,7 @@ oslHostAddr SAL_CALL osl_copyHostAddr (const oslHostAddr pAddr) if (pAddr) return osl_psz_createHostAddr (pAddr->pHostName, pAddr->pSockAddr); else - return (oslHostAddr)NULL; + return nullptr; } void SAL_CALL osl_getHostnameOfHostAddr ( @@ -1132,7 +1132,7 @@ oslSocketAddr SAL_CALL osl_psz_resolveHostname(const sal_Char* pszHostname) return SockAddr; } - return (oslSocketAddr)NULL; + return nullptr; } sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, rtl_uString *ustrProtocol) @@ -1463,12 +1463,12 @@ oslSocketAddr SAL_CALL osl_getLocalAddrOfSocket(oslSocket pSocket) oslSocketAddr pAddr; if (pSocket == NULL) /* ENOTSOCK */ - return (oslSocketAddr)NULL; + return nullptr; AddrLen= sizeof(struct sockaddr); if (getsockname(pSocket->m_Socket, &Addr, &AddrLen) == OSL_SOCKET_ERROR) - return (oslSocketAddr)NULL; + return nullptr; pAddr = __osl_createSocketAddrFromSystem( &Addr ); return pAddr; diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 237db690cf8b..3327229d8eb4 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -296,7 +296,7 @@ static oslThread osl_thread_create_Impl ( PTHREAD_ATTR_DEFAULT, #endif osl_thread_start_Impl, - (void*)(pImpl))) != 0) + static_cast<void*>(pImpl))) != 0) { SAL_WARN( "sal.osl", @@ -322,7 +322,7 @@ static oslThread osl_thread_create_Impl ( pthread_mutex_unlock (&(pImpl->m_Lock)); - return (oslThread)pImpl; + return static_cast<oslThread>(pImpl); } oslThread osl_createThread ( @@ -953,7 +953,7 @@ oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallbac } } - return (oslThreadKey)pKey; + return static_cast<oslThreadKey>(pKey); } void SAL_CALL osl_destroyThreadKey(oslThreadKey Key) diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 2b5766225ac1..60ed44ac839d 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -3546,7 +3546,7 @@ namespace osl_File char buffer[50000]; sal_uInt64 written = 0; - nError1 = tmp_file.write((void*)buffer, sizeof(buffer), written); + nError1 = tmp_file.write(static_cast<void*>(buffer), sizeof(buffer), written); CPPUNIT_ASSERT_MESSAGE("write failed!", nError1 == FileBase::E_None); //set the file to readonly diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx index 2eb0083535ee..4dc3fe19a489 100644 --- a/sal/qa/osl/file/test_cpy_wrt_file.cxx +++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx @@ -54,7 +54,7 @@ public: char buffer[1]; sal_uInt64 written = 0; - err = tmp_file.write((void*)buffer, sizeof(buffer), written); + err = tmp_file.write(static_cast<void*>(buffer), sizeof(buffer), written); CPPUNIT_ASSERT_MESSAGE("write on unconnected file should fail", err != osl::FileBase::E_None && written == 0); diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 56f781069f28..9f6e8ae64742 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -287,10 +287,10 @@ namespace osl_Module #if !defined( MACOSX ) // TODO: Find out why this fails on Mac OS X ::osl::Module aMod; - bRes = ( (oslModule)aMod == NULL ); + bRes = ( static_cast<oslModule>(aMod) == NULL ); aMod.load( getDllURL( ) ); - bRes1 = (oslModule)aMod != NULL; + bRes1 = static_cast<oslModule>(aMod) != NULL; aMod.unload( ); @@ -306,7 +306,7 @@ namespace osl_Module ::osl::Module aMod( getDllURL( ) ); ::rtl::OUString funcName( "firstfunc" ); - FuncPtr pFunc = reinterpret_cast<FuncPtr>(osl_getSymbol( (oslModule)aMod, funcName.pData )); + FuncPtr pFunc = reinterpret_cast<FuncPtr>(osl_getSymbol( static_cast<oslModule>(aMod), funcName.pData )); bRes = false; if ( pFunc ) bRes = pFunc( bRes ); diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index 50e2961912a4..8a80e70fba1b 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -1338,7 +1338,7 @@ rtl_cache_wsupdate_init() &(g_cache_list.m_update_thread), NULL, rtl_cache_wsupdate_all, reinterpret_cast<void*>(10)) != 0) { /* failure */ - g_cache_list.m_update_thread = (pthread_t)(0); + g_cache_list.m_update_thread = pthread_t(); } RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); } @@ -1370,7 +1370,7 @@ rtl_cache_wsupdate_fini() pthread_cond_signal (&(g_cache_list.m_update_cond)); RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); - if (g_cache_list.m_update_thread != (pthread_t)(0)) + if (g_cache_list.m_update_thread != pthread_t()) pthread_join (g_cache_list.m_update_thread, NULL); } diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index 50de1a9ad822..c5bd0f24d834 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -112,7 +112,7 @@ rtlCipher SAL_CALL rtl_cipher_create ( rtlCipherAlgorithm Algorithm, rtlCipherMode Mode) SAL_THROW_EXTERN_C() { - rtlCipher Cipher = (rtlCipher)NULL; + rtlCipher Cipher = nullptr; switch (Algorithm) { case rtl_Cipher_AlgorithmBF: @@ -1005,10 +1005,10 @@ static sal_uInt32 __rtl_cipherBF (CipherKeyBF *key, sal_uInt32 x) */ rtlCipher SAL_CALL rtl_cipher_createBF (rtlCipherMode Mode) SAL_THROW_EXTERN_C() { - CipherBF_Impl *pImpl = (CipherBF_Impl*)NULL; + CipherBF_Impl *pImpl = nullptr; if (Mode == rtl_Cipher_ModeInvalid) - return ((rtlCipher)NULL); + return (nullptr); pImpl = static_cast<CipherBF_Impl*>(rtl_allocateZeroMemory (sizeof (CipherBF_Impl))); if (pImpl) @@ -1022,7 +1022,7 @@ rtlCipher SAL_CALL rtl_cipher_createBF (rtlCipherMode Mode) SAL_THROW_EXTERN_C() pImpl->m_cipher.m_decode = rtl_cipher_decodeBF; pImpl->m_cipher.m_delete = rtl_cipher_destroyBF; } - return ((rtlCipher)pImpl); + return (static_cast<rtlCipher>(pImpl)); } /* @@ -1241,10 +1241,10 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl ( rtlCipher SAL_CALL rtl_cipher_createARCFOUR (rtlCipherMode Mode) SAL_THROW_EXTERN_C() { - CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)NULL; + CipherARCFOUR_Impl *pImpl = nullptr; if (!(Mode == rtl_Cipher_ModeStream)) - return ((rtlCipher)NULL); + return (nullptr); pImpl = static_cast<CipherARCFOUR_Impl*>(rtl_allocateZeroMemory (sizeof (CipherARCFOUR_Impl))); if (pImpl) @@ -1258,7 +1258,7 @@ rtlCipher SAL_CALL rtl_cipher_createARCFOUR (rtlCipherMode Mode) pImpl->m_cipher.m_decode = rtl_cipher_decodeARCFOUR; pImpl->m_cipher.m_delete = rtl_cipher_destroyARCFOUR; } - return ((rtlCipher)pImpl); + return (static_cast<rtlCipher>(pImpl)); } /* diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index d8f4c7119142..b997dcfc9357 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -93,7 +93,7 @@ static void __rtl_digest_swapLong (sal_uInt32 *pData, sal_uInt32 nDatLen) rtlDigest SAL_CALL rtl_digest_create (rtlDigestAlgorithm Algorithm) SAL_THROW_EXTERN_C() { - rtlDigest Digest = (rtlDigest)NULL; + rtlDigest Digest = nullptr; switch (Algorithm) { case rtl_Digest_AlgorithmMD2: @@ -390,14 +390,14 @@ rtlDigestError SAL_CALL rtl_digest_MD2 ( */ rtlDigest SAL_CALL rtl_digest_createMD2() SAL_THROW_EXTERN_C() { - DigestMD2_Impl *pImpl = (DigestMD2_Impl*)NULL; + DigestMD2_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestMD2_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_MD2; __rtl_digest_initMD2 (&(pImpl->m_context)); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* @@ -761,14 +761,14 @@ rtlDigestError SAL_CALL rtl_digest_MD5 ( */ rtlDigest SAL_CALL rtl_digest_createMD5() SAL_THROW_EXTERN_C() { - DigestMD5_Impl *pImpl = (DigestMD5_Impl*)NULL; + DigestMD5_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestMD5_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_MD5; __rtl_digest_initMD5 (&(pImpl->m_context)); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* @@ -1245,14 +1245,14 @@ rtlDigestError SAL_CALL rtl_digest_SHA ( */ rtlDigest SAL_CALL rtl_digest_createSHA() SAL_THROW_EXTERN_C() { - DigestSHA_Impl *pImpl = (DigestSHA_Impl*)NULL; + DigestSHA_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_SHA_0; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_0); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* @@ -1435,14 +1435,14 @@ rtlDigestError SAL_CALL rtl_digest_SHA1 ( */ rtlDigest SAL_CALL rtl_digest_createSHA1() SAL_THROW_EXTERN_C() { - DigestSHA_Impl *pImpl = (DigestSHA_Impl*)NULL; + DigestSHA_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_SHA_1; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_1); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* @@ -1678,14 +1678,14 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_MD5 ( */ rtlDigest SAL_CALL rtl_digest_createHMAC_MD5() SAL_THROW_EXTERN_C() { - DigestHMAC_MD5_Impl *pImpl = (DigestHMAC_MD5_Impl*)NULL; + DigestHMAC_MD5_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestHMAC_MD5_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_HMAC_MD5; __rtl_digest_initHMAC_MD5 (&(pImpl->m_context)); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* @@ -1910,14 +1910,14 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_SHA1 ( */ rtlDigest SAL_CALL rtl_digest_createHMAC_SHA1() SAL_THROW_EXTERN_C() { - DigestHMAC_SHA1_Impl *pImpl = (DigestHMAC_SHA1_Impl*)NULL; + DigestHMAC_SHA1_Impl *pImpl = nullptr; pImpl = RTL_DIGEST_CREATE(DigestHMAC_SHA1_Impl); if (pImpl) { pImpl->m_digest = __rtl_digest_HMAC_SHA1; __rtl_digest_initHMAC_SHA1 (&(pImpl->m_context)); } - return (rtlDigest)pImpl; + return static_cast<rtlDigest>(pImpl); } /* diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 0a5638f57423..1f6d2b42d4cd 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -268,17 +268,17 @@ static void __rtl_random_readPool ( */ rtlRandomPool SAL_CALL rtl_random_createPool() SAL_THROW_EXTERN_C() { - RandomPool_Impl *pImpl = (RandomPool_Impl*)NULL; + RandomPool_Impl *pImpl = nullptr; pImpl = static_cast<RandomPool_Impl*>(rtl_allocateZeroMemory (sizeof(RandomPool_Impl))); if (pImpl) { if (!__rtl_random_initPool (pImpl)) { rtl_freeZeroMemory (pImpl, sizeof(RandomPool_Impl)); - pImpl = (RandomPool_Impl*)NULL; + pImpl = nullptr; } } - return (rtlRandomPool)pImpl; + return static_cast<rtlRandomPool>(pImpl); } /* diff --git a/sal/textenc/textcvt.cxx b/sal/textenc/textcvt.cxx index 6292e244a151..eaabe68b9853 100644 --- a/sal/textenc/textcvt.cxx +++ b/sal/textenc/textcvt.cxx @@ -106,7 +106,7 @@ rtl_TextToUnicodeConverter SAL_CALL rtl_createTextToUnicodeConverter( rtl_TextEn { const ImplTextEncodingData* pData = Impl_getTextEncodingData( eTextEncoding ); if ( pData ) - return (rtl_TextToUnicodeConverter) &pData->maConverter; + return static_cast<rtl_TextToUnicodeConverter>(const_cast<ImplTextConverter *>(&pData->maConverter)); else return 0; } @@ -184,7 +184,7 @@ rtl_UnicodeToTextConverter SAL_CALL rtl_createUnicodeToTextConverter( rtl_TextEn { const ImplTextEncodingData* pData = Impl_getTextEncodingData( eTextEncoding ); if ( pData ) - return (rtl_TextToUnicodeConverter) &pData->maConverter; + return static_cast<rtl_TextToUnicodeConverter>(const_cast<ImplTextConverter *>(&pData->maConverter)); else return 0; } |