connectivity/source/drivers/file/FStatement.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
New commits: commit db7152d2cabcfb0279cf3bd6947c321a6cb9448d Author: Bogdan Buzea <[email protected]> AuthorDate: Fri Oct 18 06:38:35 2024 +0200 Commit: David Gilbert <[email protected]> CommitDate: Wed Nov 20 13:52:12 2024 +0100 tdf#163486: PVS: Identical branches Change-Id: Ibd3f95a7af4df51aee5fd1974914aa808dded229 V1037: Two or more case-branches perform the same actions. Check lines: 666, 688. Similar cases are grouped closer. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175051 Reviewed-by: David Gilbert <[email protected]> Tested-by: Jenkins diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index fca2c963eb33..ee260fdb33e5 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -659,14 +659,6 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName, { switch (::comphelper::getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))) { - // put criteria depending on the Type as String or double in the variable - case DataType::CHAR: - case DataType::VARCHAR: - case DataType::LONGVARCHAR: - *(*m_aAssignValues)[nId] = ORowSetValue(aValue); - //Characterset is already converted, since the entire statement was converted - break; - case DataType::BIT: if (aValue.equalsIgnoreAsciiCase("TRUE") || aValue[0] == '1') *(*m_aAssignValues)[nId] = true; @@ -675,6 +667,10 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName, else throwFunctionSequenceException(*this); break; + case DataType::CHAR: + case DataType::VARCHAR: + case DataType::LONGVARCHAR: + //Characterset is already converted, since the entire statement was converted case DataType::TINYINT: case DataType::SMALLINT: case DataType::INTEGER:
