diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:32:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:24 +0200 |
commit | 39950c5b7c687016c8e746258064a4d3e497d415 (patch) | |
tree | fff0c3066736e19a7ea44c4e1d418e3578ed8eb6 /mysqlc | |
parent | 36b06bffadac67b30a5e81b66315cf972c26da88 (diff) |
loplugin:simplifybool
Change-Id: Icbd2ce16467c574243d223ae68e79ca043a2ca45
Diffstat (limited to 'mysqlc')
-rw-r--r-- | mysqlc/source/mysqlc_connection.cxx | 2 | ||||
-rw-r--r-- | mysqlc/source/mysqlc_databasemetadata.cxx | 4 | ||||
-rw-r--r-- | mysqlc/source/mysqlc_preparedstatement.cxx | 2 | ||||
-rw-r--r-- | mysqlc/source/mysqlc_statement.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index 50185a782b47..6cd26b123770 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -324,7 +324,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit() bool autoCommit = false; try { - autoCommit = m_settings.cppConnection->getAutoCommit() == true ? true : false; + autoCommit = m_settings.cppConnection->getAutoCommit() == true; } catch (const sql::SQLException & e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding()); } diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index c37cfbcaab65..e975611ddc63 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -182,7 +182,7 @@ bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool ( OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); bool boolMetaData(false); try { - boolMetaData = (meta->*_Method)() ? true : false; + boolMetaData = (meta->*_Method)(); } catch (const sql::MethodNotImplementedException &) { mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); } catch (const sql::InvalidArgumentException &) { @@ -198,7 +198,7 @@ bool ODatabaseMetaData::impl_getBoolMetaData(const sal_Char* _methodName, bool ( OSL_TRACE( "mysqlc::ODatabaseMetaData::%s", _methodName); bool boolMetaData(false); try { - boolMetaData = (meta->*_Method)( _arg ) ? true : false; + boolMetaData = (meta->*_Method)( _arg ); } catch (const sql::MethodNotImplementedException &) { mysqlc_sdbc_driver::throwFeatureNotImplementedException(_methodName, *this); } catch (const sql::InvalidArgumentException &) { diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx index 0de7c8f85ec0..7736e7386d8c 100644 --- a/mysqlc/source/mysqlc_preparedstatement.cxx +++ b/mysqlc/source/mysqlc_preparedstatement.cxx @@ -179,7 +179,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute() bool success = false; try { - success = static_cast<sql::PreparedStatement *>(cppStatement)->execute()? true:false; + success = static_cast<sql::PreparedStatement *>(cppStatement)->execute(); } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, m_pConnection->getConnectionEncoding()); } diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 5590acfd41ae..f2a15d38f7af 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -158,7 +158,7 @@ sal_Bool SAL_CALL OCommonStatement::execute(const rtl::OUString& sql) bool success = false; try { - success = cppStatement->execute(rtl::OUStringToOString(sSqlStatement, m_pConnection->getConnectionSettings().encoding).getStr())? true:false; + success = cppStatement->execute(rtl::OUStringToOString(sSqlStatement, m_pConnection->getConnectionSettings().encoding).getStr()); } catch (const sql::SQLException &e) { mysqlc_sdbc_driver::translateAndThrow(e, *this, m_pConnection->getConnectionEncoding()); } |