diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-17 18:17:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 09:06:46 +0100 |
commit | 141b01ac65d5922aacdf6010043eadc7c28304a5 (patch) | |
tree | 8080be6ba72a3d127de8702511d049512d485f11 /connectivity/source/drivers/firebird | |
parent | 876413440d051f7bae8b3d222320f4bc3b617b79 (diff) |
Some more loplugin:cstylecast: connectivity
Change-Id: Iee1d11aef454284dbe050780c4308917c1a2b36f
Diffstat (limited to 'connectivity/source/drivers/firebird')
5 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx index 18f684a46d53..0c87b3fdfdd4 100644 --- a/connectivity/source/drivers/firebird/Blob.cxx +++ b/connectivity/source/drivers/firebird/Blob.cxx @@ -239,7 +239,7 @@ sal_Int32 SAL_CALL Blob::readBytes(uno::Sequence< sal_Int8 >& rDataOut, &m_blobHandle, &nBytesRead, nReadSize, - (char*) rDataOut.getArray() + nTotalBytesRead); + reinterpret_cast<char*>(rDataOut.getArray()) + nTotalBytesRead); if (aErr && IndicatesError(m_statusVector)) { OUString sError(StatusVectorToString(m_statusVector, "isc_get_segment")); diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index c2725a979120..03bdae0e996e 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1224,7 +1224,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( if (xDescriptionBlob.is()) { sal_Int32 aBlobLength = (sal_Int32) xDescriptionBlob->length(); - aDescription = OUString((char*) xDescriptionBlob->getBytes(0, aBlobLength).getArray(), + aDescription = OUString(reinterpret_cast<char*>(xDescriptionBlob->getBytes(0, aBlobLength).getArray()), aBlobLength, RTL_TEXTENCODING_UTF8); } @@ -1392,7 +1392,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( // TODO: we should actually be using CLOB here instead. // However we haven't implemented CLOB yet, so use BLOB. sal_Int32 aBlobLength = (sal_Int32) xBlob->length(); - sDescription = OUString((char*) xBlob->getBytes(0, aBlobLength).getArray(), + sDescription = OUString(reinterpret_cast<char*>(xBlob->getBytes(0, aBlobLength).getArray()), aBlobLength, RTL_TEXTENCODING_UTF8); } diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index ac37c525e341..21a9d900b9e5 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -502,7 +502,7 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex, aErr = isc_put_segment(m_statusVector, &aBlobHandle, nWriteSize, - (const char*) xBlob->getBytes(nDataWritten, nWriteSize).getConstArray()); + reinterpret_cast<const char*>(xBlob->getBytes(nDataWritten, nWriteSize).getConstArray())); nDataWritten += nWriteSize; @@ -602,7 +602,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, aErr = isc_put_segment(m_statusVector, &aBlobHandle, nWriteSize, - (const char*) xBytes.getConstArray() + nDataWritten); + reinterpret_cast<const char*>(xBytes.getConstArray()) + nDataWritten); nDataWritten += nWriteSize; if (aErr) diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index 95a555190816..d3531d785f4e 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -437,7 +437,7 @@ Date OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT /*n { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TYPE_DATE) { - ISC_DATE aISCDate = *((ISC_DATE*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata); + ISC_DATE aISCDate = *(reinterpret_cast<ISC_DATE*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); struct tm aCTime; isc_decode_sql_date(&aISCDate, &aCTime); @@ -455,7 +455,7 @@ Time OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT /*n { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TYPE_TIME) { - ISC_TIME aISCTime = *((ISC_TIME*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata); + ISC_TIME aISCTime = *(reinterpret_cast<ISC_TIME*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); struct tm aCTime; isc_decode_sql_time(&aISCTime, &aCTime); @@ -475,7 +475,7 @@ DateTime OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TIMESTAMP) { - ISC_TIMESTAMP aISCTimestamp = *((ISC_TIMESTAMP*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata); + ISC_TIMESTAMP aISCTimestamp = *(reinterpret_cast<ISC_TIMESTAMP*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); struct tm aCTime; isc_decode_timestamp(&aISCTimestamp, &aCTime); @@ -506,7 +506,7 @@ OUString OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT { // First 2 bytes are a short containing the length of the string // No idea if sqllen is still valid here? - sal_uInt16 aLength = *((sal_uInt16*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata); + sal_uInt16 aLength = *(reinterpret_cast<sal_uInt16*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); return OUString(m_pSqlda->sqlvar[nColumnIndex-1].sqldata + 2, aLength, RTL_TEXTENCODING_UTF8); @@ -522,7 +522,7 @@ ISC_QUAD* OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHOR { // TODO: this is probably wrong if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType) - return (ISC_QUAD*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata; + return reinterpret_cast<ISC_QUAD*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata); else throw SQLException(); // TODO: better exception (can't convert Blob) } diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index f0b85913182e..3e9e54356a04 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -28,7 +28,7 @@ OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector, const OUString& rCause) { OUStringBuffer buf; - const ISC_STATUS* pStatus = (const ISC_STATUS*) &rStatusVector; + const ISC_STATUS* pStatus = reinterpret_cast<const ISC_STATUS*>(&rStatusVector); buf.appendAscii("firebird_sdbc error:"); try |