Kaydet (Commit) 35ce36b7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: mysqlc

Change-Id: I7849658606931b231c2bde0c8143bc1f325c80d4
üst 30f5040f
...@@ -162,7 +162,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw() ...@@ -162,7 +162,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance"; const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance";
typedef void* (* FGetMySQLDriver)(); 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 ) if ( !pFactoryFunction )
{ {
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!"); 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< ...@@ -721,7 +721,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
std::string blobby((char *)x.getConstArray(), x.getLength()); std::string blobby(reinterpret_cast<char const *>(x.getConstArray()), x.getLength());
try { try {
static_cast<sql::PreparedStatement *>(cppStatement)->setString(parameter, blobby); static_cast<sql::PreparedStatement *>(cppStatement)->setString(parameter, blobby);
} catch (const sql::MethodNotImplementedException &) { } catch (const sql::MethodNotImplementedException &) {
......
...@@ -224,7 +224,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) ...@@ -224,7 +224,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
if (!val.length()) { if (!val.length()) {
return Sequence< sal_Int8>(); return Sequence< sal_Int8>();
} else { } 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());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment