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:
{
int localRes = 0;
bool flagP1 = false;
if (arc->IsIntersectLine(r1Arc))
{
++localRes;
flagP1 = true;
}
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 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>::const_iterator i = tokens.constBegin();

View file

@ -76,7 +76,7 @@ private:
const qmu::QmuTranslation &d);
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

View file

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

View file

@ -39,6 +39,7 @@ TST_VAbstractDetail::TST_VAbstractDetail(QObject *parent)
}
//---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_VAbstractDetail::EquidistantRemoveLoop() const
{
// 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()
{
const VPointF center;
@ -59,6 +60,7 @@ void TST_VArc::CompareTwoWays()
}
//---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
void TST_VArc::NegativeArc()
{
const VPointF center;