Cppcheck warnings.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-06-12 12:15:59 +03:00
parent fbeabaa8a9
commit f331f6fa5f
6 changed files with 7 additions and 5 deletions

View File

@ -99,12 +99,9 @@ void VisToolPointFromArcAndTangent::FindRays(const QPointF &p, const VArc *arc)
case 2: case 2:
{ {
int localRes = 0; int localRes = 0;
bool flagP1 = false;
if (arc->IsIntersectLine(r1Arc)) if (arc->IsIntersectLine(r1Arc))
{ {
++localRes; ++localRes;
flagP1 = true;
} }
if (arc->IsIntersectLine(r2Arc)) if (arc->IsIntersectLine(r2Arc))

View File

@ -1077,7 +1077,7 @@ void VTranslateVars::CorrectionsPositions(int position, int bias, QMap<int, QStr
* @param bias difference between original token length and translated * @param bias difference between original token length and translated
* @param tokens all tokens * @param tokens all tokens
*/ */
void VTranslateVars::BiasTokens(int position, int bias, QMap<int, QString> &tokens) const void VTranslateVars::BiasTokens(int position, int bias, QMap<int, QString> &tokens)
{ {
QMap<int, QString> newTokens; QMap<int, QString> newTokens;
QMap<int, QString>::const_iterator i = tokens.constBegin(); QMap<int, QString>::const_iterator i = tokens.constBegin();

View File

@ -76,7 +76,7 @@ private:
const qmu::QmuTranslation &d); const qmu::QmuTranslation &d);
void CorrectionsPositions(int position, int bias, QMap<int, QString> &tokens, QMap<int, QString> &numbers) const; void CorrectionsPositions(int position, int bias, QMap<int, QString> &tokens, QMap<int, QString> &numbers) const;
void BiasTokens(int position, int bias, QMap<int, QString> &tokens) const; static void BiasTokens(int position, int bias, QMap<int, QString> &tokens);
}; };
#endif // VTRANSLATEVARS_H #endif // VTRANSLATEVARS_H

View File

@ -38,6 +38,7 @@ TST_NameRegExp::TST_NameRegExp(QObject *parent) :
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_NameRegExp::TestNameRegExp_data() void TST_NameRegExp::TestNameRegExp_data()
{ {
QTest::addColumn<QString>("name"); QTest::addColumn<QString>("name");
@ -97,6 +98,7 @@ void TST_NameRegExp::TestNameRegExp_data()
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_NameRegExp::TestNameRegExp() void TST_NameRegExp::TestNameRegExp()
{ {
const QRegularExpression re(NameRegExp()); const QRegularExpression re(NameRegExp());

View File

@ -39,6 +39,7 @@ TST_VAbstractDetail::TST_VAbstractDetail(QObject *parent)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_VAbstractDetail::EquidistantRemoveLoop() const void TST_VAbstractDetail::EquidistantRemoveLoop() const
{ {
// These are two real cases where equdistant has loop. // These are two real cases where equdistant has loop.

View File

@ -37,6 +37,7 @@ TST_VArc::TST_VArc(QObject *parent)
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_VArc::CompareTwoWays() void TST_VArc::CompareTwoWays()
{ {
const VPointF center; const VPointF center;
@ -59,6 +60,7 @@ void TST_VArc::CompareTwoWays()
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_VArc::NegativeArc() void TST_VArc::NegativeArc()
{ {
const VPointF center; const VPointF center;