fix various flaws detected by PVS
This commit is contained in:
@@ -50,7 +50,7 @@ int QuantityFormat::defaultDenominator = 8; // for 1/8"
|
||||
|
||||
|
||||
QuantityFormat::QuantityFormat()
|
||||
: option(static_cast<NumberOption>(OmitGroupSeparator | RejectGroupSeparator))
|
||||
: option(OmitGroupSeparator | RejectGroupSeparator)
|
||||
, format(Fixed)
|
||||
, precision(UnitsApi::getDecimals())
|
||||
, denominator(defaultDenominator)
|
||||
|
||||
@@ -48,7 +48,8 @@ struct BaseExport QuantityFormat {
|
||||
Scientific = 2
|
||||
};
|
||||
|
||||
NumberOption option;
|
||||
typedef int NumberOptions;
|
||||
NumberOptions option;
|
||||
NumberFormat format;
|
||||
int precision;
|
||||
int denominator;
|
||||
|
||||
@@ -492,8 +492,7 @@ QPixmap BitmapFactoryInst::resize(int w, int h, const QPixmap& p, Qt::BGMode bgm
|
||||
QColor dl = pal.color(QPalette::Disabled, QPalette::Light);
|
||||
QColor dt = pal.color(QPalette::Disabled, QPalette::Text);
|
||||
|
||||
QPixmap pm = pix;
|
||||
pm = QPixmap(w,h);
|
||||
QPixmap pm(w,h);
|
||||
pm.fill(dl);
|
||||
|
||||
QPainter pt;
|
||||
@@ -575,15 +574,15 @@ QPixmap BitmapFactoryInst::merge(const QPixmap& p1, const QPixmap& p2, Position
|
||||
|
||||
switch (pos)
|
||||
{
|
||||
case Qt::TopLeftCorner:
|
||||
case TopLeft:
|
||||
break;
|
||||
case Qt::TopRightCorner:
|
||||
case TopRight:
|
||||
x = p1.width () - p2.width ();
|
||||
break;
|
||||
case Qt::BottomLeftCorner:
|
||||
case BottomLeft:
|
||||
y = p1.height() - p2.height();
|
||||
break;
|
||||
case Qt::BottomRightCorner:
|
||||
case BottomRight:
|
||||
x = p1.width () - p2.width ();
|
||||
y = p1.height() - p2.height();
|
||||
break;
|
||||
|
||||
@@ -210,7 +210,6 @@ private:
|
||||
void updateText(const Base::Quantity&);
|
||||
|
||||
private:
|
||||
QLabel* iconLabel;
|
||||
QByteArray m_sPrefGrp;
|
||||
bool validInput;
|
||||
|
||||
|
||||
@@ -1072,7 +1072,7 @@ bool SoFCCSysDragger::isShownTranslationY()
|
||||
|
||||
bool SoFCCSysDragger::isShownTranslationZ()
|
||||
{
|
||||
SoSwitch *sw = SO_GET_ANY_PART(this, "yTranslatorSwitch", SoSwitch);
|
||||
SoSwitch *sw = SO_GET_ANY_PART(this, "zTranslatorSwitch", SoSwitch);
|
||||
return (sw->whichChild.getValue() == SO_SWITCH_ALL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user