summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/ResultSet.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-20 16:14:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-21 15:41:50 +0200
commit2a612907aef4c9987f906c6b98aa9b400f58f617 (patch)
tree6170f363054cabb1cd33af9208145827b22c83a1 /connectivity/source/drivers/firebird/ResultSet.cxx
parent3a481dde031ba416ec4ef0351130e26e49417418 (diff)
loplugin:flatten in connectivity..desktop
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b Reviewed-on: https://gerrit.libreoffice.org/42578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/firebird/ResultSet.cxx')
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 859b28f48d0c..abb0c03b8be0 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -614,10 +614,10 @@ template <>
ISC_QUAD* OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT nType)
{
// TODO: this is probably wrong
- if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType)
- return reinterpret_cast<ISC_QUAD*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
- else
+ if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) != nType)
throw SQLException(); // TODO: better exception (can't convert Blob)
+
+ return reinterpret_cast<ISC_QUAD*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
}
template <typename T>