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 <freedesktop@treblig.org> Tested-by: Jenkins
This commit is contained in:
parent
bf0c416647
commit
db7152d2ca
1 changed files with 4 additions and 8 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue