(no bug) Replace two c-style casts in nsFrame.cpp with const_cast<>. (no review; trivial/non-functional)

This commit is contained in:
Daniel Holbert 2013-09-23 21:04:08 -07:00
parent 41da4e36b5
commit 39c340ae62

View File

@ -2507,7 +2507,7 @@ nsFrame::IsSelectable(bool* aSelectable, uint8_t* aSelectStyle) const
// AUTO -> CELL -> TEXT -> AUTO, the returned value is TEXT
//
uint8_t selectStyle = NS_STYLE_USER_SELECT_AUTO;
nsIFrame* frame = (nsIFrame*)this;
nsIFrame* frame = const_cast<nsFrame*>(this);
while (frame) {
const nsStyleUIReset* userinterface = frame->StyleUIReset();
@ -4518,7 +4518,7 @@ NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset,
nsView** aView) const
{
NS_PRECONDITION(nullptr != aView, "null OUT parameter pointer");
nsIFrame* frame = (nsIFrame*)this;
nsIFrame* frame = const_cast<nsFrame*>(this);
*aView = nullptr;
aOffset.MoveTo(0, 0);