Clang's warnings.

--HG--
branch : develop
This commit is contained in:
dismine 2014-06-01 10:56:11 +03:00
parent c349a93a73
commit b32e01f3a6
3 changed files with 85 additions and 70 deletions

View file

@ -486,7 +486,6 @@ CONFIG(debug, debug|release){
-Wunused-value \
-Wunused-variable \
-Wunused-volatile-lvalue \
-Wused-but-marked-unused \
-Wuser-defined-literals \
-Wvarargs \
-Wvariadic-macros \

View file

@ -30,11 +30,22 @@
#include <QDebug>
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VSplinePoint default constructor.
*/
VSplinePoint::VSplinePoint()
:pSpline(VPointF()), angle1(0), angle2(180), kAsm1(1), kAsm2(1)
{}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VSplinePoint constructor.
* @param pSpline spline point.
* @param kAsm1 coefficient of length first control line.
* @param angle1 first angle control line.
* @param kAsm2 coefficient of length second control line.
* @param angle2 second angle control line.
*/
VSplinePoint::VSplinePoint(VPointF pSpline, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2)
:pSpline(pSpline), angle1(0), angle2(180), kAsm1(kAsm1), kAsm2(kAsm2)
{
@ -46,11 +57,30 @@ VSplinePoint::VSplinePoint(VPointF pSpline, qreal kAsm1, qreal angle1, qreal kAs
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VSplinePoint copy constructor
* @param point point
*/
VSplinePoint::VSplinePoint(const VSplinePoint &point)
:pSpline(point.P()), angle1(point.Angle1()), angle2(point.Angle2()), kAsm1(point.KAsm1()), kAsm2(point.KAsm2())
{}
//---------------------------------------------------------------------------------------------------------------------
VSplinePoint &VSplinePoint::operator=(const VSplinePoint &point)
{
this->pSpline = point.P();
this->angle1 = point.Angle1();
this->angle2 = point.Angle2();
this->kAsm1 = point.KAsm1();
this->kAsm2 = point.KAsm2();
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetAngle1 set first angle of spline.
* @param value angle.
*/
void VSplinePoint::SetAngle1(const qreal &value)
{
QLineF line(0, 0, 100, 0);
@ -62,6 +92,10 @@ void VSplinePoint::SetAngle1(const qreal &value)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetAngle2 set second angle of spline.
* @param value angle.
*/
void VSplinePoint::SetAngle2(const qreal &value)
{
QLineF line(0, 0, 100, 0);

View file

@ -39,131 +39,113 @@
class VSplinePoint
{
public:
/**
* @brief VSplinePoint default constructor.
*/
VSplinePoint();
/**
* @brief VSplinePoint constructor.
* @param pSpline spline point.
* @param angle second angle control line.
* @param factor coefficient of length second control line.
*/
VSplinePoint();
VSplinePoint(VPointF pSpline, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
/**
* @brief VSplinePoint copy constructor
* @param point point
*/
VSplinePoint(const VSplinePoint &point);
VSplinePoint &operator=(const VSplinePoint &point);
~VSplinePoint() {}
/**
* @brief P return point.
* @return point.
*/
VPointF P() const;
/**
* @brief SetP set point.
* @param value point.
*/
void SetP(const VPointF &value);
/**
* @brief Angle1 return first angle of spline.
* @return angle.
*/
qreal Angle1() const;
/**
* @brief SetAngle1 set first angle of spline.
* @param value angle.
*/
void SetAngle1(const qreal &value);
/**
* @brief SetAngle2 set second angle of spline.
* @param value angle.
*/
void SetAngle2(const qreal &value);
/**
* @brief Angle2 return second angle of spline.
* @return angle.
*/
qreal Angle2() const;
/**
* @brief KAsm1 return coefficient of length first control line.
* @return coefficient.
*/
qreal KAsm1() const;
/**
* @brief SetKAsm1 set coefficient of length first control line.
* @param value coefficient.
*/
void SetKAsm1(const qreal &value);
/**
* @brief KAsm2 return coefficient of length second control line.
* @return coefficient.
*/
qreal KAsm2() const;
/**
* @brief SetKAsm2 set coefficient of length second control line.
* @param value coefficient.
*/
void SetKAsm2(const qreal &value);
protected:
/**
* @brief pSpline point.
*/
/** @brief pSpline point. */
VPointF pSpline;
/**
* @brief angle1 first angle spline.
*/
/** @brief angle1 first angle spline. */
qreal angle1;
/**
* @brief angle2 second angle spline.
*/
/** @brief angle2 second angle spline. */
qreal angle2;
/**
* @brief kAsm1 coefficient of length first control line.
*/
/** @brief kAsm1 coefficient of length first control line. */
qreal kAsm1;
/**
* @brief kAsm2 coefficient of length second control line.
*/
/** @brief kAsm2 coefficient of length second control line. */
qreal kAsm2;
};
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief P return point.
* @return point.
*/
inline VPointF VSplinePoint::P() const
{
return pSpline;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetP set point.
* @param value point.
*/
inline void VSplinePoint::SetP(const VPointF &value)
{
pSpline = value;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Angle1 return first angle of spline.
* @return angle.
*/
inline qreal VSplinePoint::Angle1() const
{
return angle1;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Angle2 return second angle of spline.
* @return angle.
*/
inline qreal VSplinePoint::Angle2() const
{
return angle2;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief KAsm1 return coefficient of length first control line.
* @return coefficient.
*/
inline qreal VSplinePoint::KAsm1() const
{
return kAsm1;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetKAsm1 set coefficient of length first control line.
* @param value coefficient.
*/
inline void VSplinePoint::SetKAsm1(const qreal &value)
{
kAsm1 = value;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief KAsm2 return coefficient of length second control line.
* @return coefficient.
*/
inline qreal VSplinePoint::KAsm2() const
{
return kAsm2;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetKAsm2 set coefficient of length second control line.
* @param value coefficient.
*/
inline void VSplinePoint::SetKAsm2(const qreal &value)
{
kAsm2 = value;