Some more loplugin:cstylecast: mysqlc
Change-Id: I7849658606931b231c2bde0c8143bc1f325c80d4
This commit is contained in:
@@ -162,7 +162,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
|
||||
const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance";
|
||||
typedef void* (* FGetMySQLDriver)();
|
||||
|
||||
const FGetMySQLDriver pFactoryFunction = (FGetMySQLDriver)( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) );
|
||||
const FGetMySQLDriver pFactoryFunction = reinterpret_cast<FGetMySQLDriver>( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) );
|
||||
if ( !pFactoryFunction )
|
||||
{
|
||||
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!");
|
||||
|
@@ -721,7 +721,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
|
||||
checkDisposed(OPreparedStatement::rBHelper.bDisposed);
|
||||
checkParameterIndex(parameter);
|
||||
|
||||
std::string blobby((char *)x.getConstArray(), x.getLength());
|
||||
std::string blobby(reinterpret_cast<char const *>(x.getConstArray()), x.getLength());
|
||||
try {
|
||||
static_cast<sql::PreparedStatement *>(cppStatement)->setString(parameter, blobby);
|
||||
} catch (const sql::MethodNotImplementedException &) {
|
||||
|
@@ -224,7 +224,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
|
||||
if (!val.length()) {
|
||||
return Sequence< sal_Int8>();
|
||||
} else {
|
||||
return Sequence< sal_Int8 > ((sal_Int8*)val.c_str(), val.length());
|
||||
return Sequence< sal_Int8 > (reinterpret_cast<sal_Int8 const *>(val.c_str()), val.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user