标签:Codacy Code Style
Codacy Quality CheckListVariable ‘var‘ is reassigned a value before the old one has been used.
double scaleFactor = 1.0;
UnitTypeEnum bodyLenUnit = kUnitType_NULL;
object->LengthUnit(bodyLenUnit);
scaleFactor = ParasolidBridgeUtility::UnitScaleFactor(bodyLenUnit);
Prefer prefix ++/-- operators for non-primitive types.
for (iter=innerLoopVec.begin(); innerLoopVec.end()!=iter; iter++)
{
...
}
Assignment of function parameter has no effect outside the function.
void Foo(A* pA)
{
delete pA;
pA = nullptr;
}
Class ‘XXX‘ has a constructor with 1 argument that is not explicit.
class A
{
public:
A(int){} //default contruct won‘t be provided
};
while ( name.Text[j] != ‘>‘ && j < name.TextLength )
{
...
}
标签:Codacy Code Style
原文地址:http://blog.51cto.com/xqtyler/2096395