Applying patch from issue 1257: "Code cleanup: removal of unnessesary variables, fixed C-style pointer casting" on behalf of lebedev

This commit is contained in:
natureh
2012-02-25 16:10:20 +01:00
parent 59623f63ab
commit ea5a4f73cf
66 changed files with 131 additions and 208 deletions

View File

@@ -66,14 +66,14 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
if (!diagonalSubGroup) {
diagonalSubGroup = new DiagonalCurveEditorSubGroup(this);
}
return (CurveEditor*)diagonalSubGroup->addCurve(curveLabel);
return (static_cast<CurveEditor*>(diagonalSubGroup->addCurve(curveLabel)));
case (CT_Flat):
if (!flatSubGroup) {
flatSubGroup = new FlatCurveEditorSubGroup(this);
}
return (CurveEditor*)flatSubGroup->addCurve(curveLabel, periodic);
return (static_cast<CurveEditor*>(flatSubGroup->addCurve(curveLabel, periodic)));
default:
return (CurveEditor*)NULL;
return (static_cast<CurveEditor*>(NULL));
break;
}
}
@@ -238,7 +238,7 @@ void CurveEditorGroup::setCurveExternal (CurveEditor* ce, const std::vector<doub
ce->subGroup->storeCurveValues(ce, c); // The new curve is saved in the CurveEditor
(ce)->selected = c[0]; // We set the selected curve type in the CurveEditor to the one of the specified curve
}
updateGUI((CurveEditor*)ce); // And we update the GUI if necessary
updateGUI(static_cast<CurveEditor*>(ce)); // And we update the GUI if necessary
}
/*