Skip to content

Commit

Permalink
refs #6271. Fix GCC warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jan 11, 2013
1 parent 6b18eca commit b5d8dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ namespace MantidQt
private:
/// Alias for container of subjects type.
typedef std::vector<PeaksPresenter_sptr> SubjectContainer;
/// Default behaviour
PeaksPresenter_sptr m_default;
/// Subject presenters.
SubjectContainer m_subjects;
/// Use default
Expand All @@ -83,6 +81,8 @@ namespace MantidQt
PeakPalette m_palette;
/// Zoomable peaks view.
ZoomablePeaksView* const m_zoomablePlottingWidget;
/// Default behaviour
PeaksPresenter_sptr m_default;
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace MantidQt
SubjectContainer::iterator iterator = getPresenterIteratorFromWorkspace(ws);

// Update the palette the foreground colour
const int pos = std::distance(m_subjects.begin(), iterator);
const int pos = static_cast<int>(std::distance(m_subjects.begin(), iterator));
m_palette.setForegroundColour(pos, colour);

// Apply the foreground colour
Expand All @@ -209,7 +209,7 @@ namespace MantidQt
SubjectContainer::iterator iterator = getPresenterIteratorFromWorkspace(ws);

// Update the palette background colour.
const int pos = std::distance(m_subjects.begin(), iterator);
const int pos = static_cast<int>(std::distance(m_subjects.begin(), iterator));
m_palette.setBackgroundColour(pos, colour);

// Apply the background colour
Expand Down Expand Up @@ -248,7 +248,7 @@ namespace MantidQt
throw std::runtime_error("Foreground colours from palette cannot be fetched until nested presenters are added.");
}
SubjectContainer::const_iterator iterator = getPresenterIteratorFromWorkspace(ws);
const int pos = std::distance(m_subjects.begin(), iterator);
const int pos = static_cast<int>(std::distance(m_subjects.begin(), iterator));
return m_palette.foregroundIndexToColour(pos);
}

Expand All @@ -263,7 +263,7 @@ namespace MantidQt
throw std::runtime_error("Background colours from palette cannot be fetched until nested presenters are added.");
}
SubjectContainer::const_iterator iterator = getPresenterIteratorFromWorkspace(ws);
const int pos = std::distance(m_subjects.begin(), iterator);
const int pos = static_cast<int>(std::distance(m_subjects.begin(), iterator));
return m_palette.backgroundIndexToColour(pos);
}

Expand Down

0 comments on commit b5d8dcf

Please sign in to comment.