Code cleanup: size() vs empty(), possible memleaks, initialization list order. On behalf of lebedev.ri, see issue 1195

This commit is contained in:
DrSlony
2012-01-08 17:35:33 +00:00
parent 02e6d9e9a5
commit 977094a912
54 changed files with 342 additions and 198 deletions

View File

@@ -651,7 +651,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) {
curve.y.erase (ity, curve.y.end());
curve.leftTangent.erase (itlt, curve.leftTangent.end());
curve.rightTangent.erase (itrt, curve.rightTangent.end());
if (!curve.x.size()) {
if (curve.x.empty()) {
curve.x.push_back (0.5);
curve.y.push_back (0.5);
curve.leftTangent.push_back (0.3);