Kaydet (Commit) 5072e01d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:cstylecast: mysqlc

auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I4bc61dbaf5d920e75269564cd92b19ae05046ca6
üst e1771984
......@@ -161,7 +161,7 @@ void OConnection::construct(const rtl::OUString& url, const Sequence< PropertyVa
connProps["userName"] = sql::ConnectPropertyVal(user_str);
connProps["password"] = sql::ConnectPropertyVal(pass_str);
connProps["schema"] = sql::ConnectPropertyVal(schema_str);
connProps["port"] = sql::ConnectPropertyVal((int)nPort);
connProps["port"] = sql::ConnectPropertyVal(static_cast<int>(nPort));
if (unixSocketPassed) {
sql::SQLString socket_str = rtl::OUStringToOString(sUnixSocket, m_settings.encoding).getStr();
connProps["socket"] = socket_str;
......
......@@ -726,7 +726,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons
void OPreparedStatement::checkParameterIndex(sal_Int32 column)
{
if (column < 1 || column > (sal_Int32) m_paramCount) {
if (column < 1 || column > static_cast<sal_Int32>(m_paramCount)) {
throw SQLException("Parameter index out of range", *this, rtl::OUString(), 1, Any ());
}
}
......
......@@ -380,7 +380,7 @@ sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return (sal_Int16) m_result->getInt(column);
return static_cast<sal_Int16>(m_result->getInt(column));
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -1043,7 +1043,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getProp
void OResultSet::checkColumnIndex(sal_Int32 index)
{
if (index < 1 || index > (int) fieldCount) {
if (index < 1 || index > static_cast<int>(fieldCount)) {
/* static object for efficiency or thread safety is a problem ? */
throw SQLException("index out of range", *this, rtl::OUString(), 1, Any());
}
......
......@@ -323,7 +323,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isWritable(sal_Int32 column)
void OResultSetMetaData::checkColumnIndex(sal_Int32 columnIndex)
{
if (columnIndex < 1 || columnIndex > (sal_Int32) meta->getColumnCount()) {
if (columnIndex < 1 || columnIndex > static_cast<sal_Int32>(meta->getColumnCount())) {
rtl::OUStringBuffer buf;
buf.appendAscii( "Column index out of range (expected 1 to " );
......
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