From 6cb0b79e4befffd98bbe713f6593ec4673759ba3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 17 Feb 2019 19:54:24 +0100 Subject: [PATCH] PVS: V705 It is possible that 'else' block was forgotten or commented out, thus altering the program's operation logics. --- src/Base/Unit.cpp | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Base/Unit.cpp b/src/Base/Unit.cpp index 8cca625a82..579d1befb9 100644 --- a/src/Base/Unit.cpp +++ b/src/Base/Unit.cpp @@ -426,32 +426,32 @@ QString Unit::getString(void) const QString Unit::getTypeString(void) const { - if(*this == Unit::Length ) return QString::fromLatin1("Length"); else - if(*this == Unit::Area ) return QString::fromLatin1("Area"); else - if(*this == Unit::Volume ) return QString::fromLatin1("Volume"); else - if(*this == Unit::Mass ) return QString::fromLatin1("Mass"); else - if(*this == Unit::Angle ) return QString::fromLatin1("Angle"); else - if(*this == Unit::Density ) return QString::fromLatin1("Density"); else - if(*this == Unit::TimeSpan ) return QString::fromLatin1("TimeSpan"); else - if(*this == Unit::Velocity ) return QString::fromLatin1("Velocity"); else - if(*this == Unit::Acceleration ) return QString::fromLatin1("Acceleration"); else - if(*this == Unit::Temperature ) return QString::fromLatin1("Temperature"); else - if(*this == Unit::ElectricCurrent ) return QString::fromLatin1("ElectricCurrent"); else - if(*this == Unit::ElectricPotential ) return QString::fromLatin1("ElectricPotential"); else - if(*this == Unit::AmountOfSubstance ) return QString::fromLatin1("AmountOfSubstance"); else - if(*this == Unit::LuminousIntensity ) return QString::fromLatin1("LuminousIntensity"); else - if(*this == Unit::Pressure ) return QString::fromLatin1("Pressure"); else - if(*this == Unit::Force ) return QString::fromLatin1("Force"); else - if(*this == Unit::Work ) return QString::fromLatin1("Work"); else - if(*this == Unit::Power ) return QString::fromLatin1("Power"); else - if(*this == Unit::SpecificEnergy ) return QString::fromLatin1("SpecificEnergy"); else - if(*this == Unit::ThermalConductivity ) return QString::fromLatin1("ThermalConductivity"); else - if(*this == Unit::ThermalExpansionCoefficient ) return QString::fromLatin1("ThermalExpansionCoefficient"); else - if(*this == Unit::SpecificHeat ) return QString::fromLatin1("SpecificHeat"); else - if(*this == Unit::ThermalTransferCoefficient ) return QString::fromLatin1("ThermalTransferCoefficient"); else - if(*this == Unit::HeatFlux ) return QString::fromLatin1("HeatFlux"); else - if(*this == Unit::DynamicViscosity ) return QString::fromLatin1("DynamicViscosity"); else - if(*this == Unit::KinematicViscosity ) return QString::fromLatin1("KinematicViscosity"); else + if(*this == Unit::Length ) return QString::fromLatin1("Length"); + if(*this == Unit::Area ) return QString::fromLatin1("Area"); + if(*this == Unit::Volume ) return QString::fromLatin1("Volume"); + if(*this == Unit::Mass ) return QString::fromLatin1("Mass"); + if(*this == Unit::Angle ) return QString::fromLatin1("Angle"); + if(*this == Unit::Density ) return QString::fromLatin1("Density"); + if(*this == Unit::TimeSpan ) return QString::fromLatin1("TimeSpan"); + if(*this == Unit::Velocity ) return QString::fromLatin1("Velocity"); + if(*this == Unit::Acceleration ) return QString::fromLatin1("Acceleration"); + if(*this == Unit::Temperature ) return QString::fromLatin1("Temperature"); + if(*this == Unit::ElectricCurrent ) return QString::fromLatin1("ElectricCurrent"); + if(*this == Unit::ElectricPotential ) return QString::fromLatin1("ElectricPotential"); + if(*this == Unit::AmountOfSubstance ) return QString::fromLatin1("AmountOfSubstance"); + if(*this == Unit::LuminousIntensity ) return QString::fromLatin1("LuminousIntensity"); + if(*this == Unit::Pressure ) return QString::fromLatin1("Pressure"); + if(*this == Unit::Force ) return QString::fromLatin1("Force"); + if(*this == Unit::Work ) return QString::fromLatin1("Work"); + if(*this == Unit::Power ) return QString::fromLatin1("Power"); + if(*this == Unit::SpecificEnergy ) return QString::fromLatin1("SpecificEnergy"); + if(*this == Unit::ThermalConductivity ) return QString::fromLatin1("ThermalConductivity"); + if(*this == Unit::ThermalExpansionCoefficient ) return QString::fromLatin1("ThermalExpansionCoefficient"); + if(*this == Unit::SpecificHeat ) return QString::fromLatin1("SpecificHeat"); + if(*this == Unit::ThermalTransferCoefficient ) return QString::fromLatin1("ThermalTransferCoefficient"); + if(*this == Unit::HeatFlux ) return QString::fromLatin1("HeatFlux"); + if(*this == Unit::DynamicViscosity ) return QString::fromLatin1("DynamicViscosity"); + if(*this == Unit::KinematicViscosity ) return QString::fromLatin1("KinematicViscosity"); return QString();