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

@@ -90,7 +90,7 @@ void FlatCurveEditorSubGroup::switchGUI() {
removeEditor();
FlatCurveEditor* dCurve = (FlatCurveEditor*)(parent->displayedCurve);
FlatCurveEditor* dCurve = static_cast<FlatCurveEditor*>(parent->displayedCurve);
if (dCurve) {
@@ -202,12 +202,12 @@ void FlatCurveEditorSubGroup::restoreDisplayedHistogram() {
void FlatCurveEditorSubGroup::storeCurveValues (CurveEditor* ce, const std::vector<double>& p) {
if (!p.empty()) {
FlatCurveType t = (FlatCurveType)p[0];
FlatCurveType t = static_cast<FlatCurveType>(p[0]);
for (int i=0; i<(int)p.size(); i++)
switch (t) {
case (FCT_MinMaxCPoints):
((FlatCurveEditor*)ce)->controlPointsCurveEd = p;
static_cast<FlatCurveEditor*>(ce)->controlPointsCurveEd = p;
break;
default:
break;