Skip to content

Commit

Permalink
Fix warnings introduced by 9b8fa99
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Oct 10, 2017
1 parent 32ae492 commit 1ff5c20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/guiEditBoxWithScrollbar.cpp
Expand Up @@ -131,7 +131,7 @@ video::SColor GUIEditBoxWithScrollBar::getOverrideColor() const
//! Turns the border on or off
void GUIEditBoxWithScrollBar::setDrawBorder(bool border)
{
border = border;
m_border = border;
}

//! Sets whether to draw the background
Expand Down Expand Up @@ -257,7 +257,7 @@ bool GUIEditBoxWithScrollBar::processKey(const SEvent& event)
if (!m_writable) {
return false;
}

if (!event.KeyInput.PressedDown)
return false;

Expand Down Expand Up @@ -791,7 +791,7 @@ void GUIEditBoxWithScrollBar::draw()
} else {
mend = font->getDimension(txt_line->c_str()).Width;
}


m_current_text_rect.UpperLeftCorner.X += mbegin;
m_current_text_rect.LowerRightCorner.X = m_current_text_rect.UpperLeftCorner.X + mend - mbegin;
Expand Down Expand Up @@ -1041,7 +1041,7 @@ void GUIEditBoxWithScrollBar::breakText()
bool line_break = false;

if (c == L'\r') { // Mac or Windows breaks

line_break = true;
c = 0;
if (Text[i + 1] == L'\n') { // Windows breaks
Expand Down Expand Up @@ -1433,7 +1433,7 @@ void GUIEditBoxWithScrollBar::updateVScrollBar()
}

// check if a vertical scrollbar is needed ?
if (getTextDimension().Height > m_frame_rect.getHeight()) {
if (getTextDimension().Height > (u32) m_frame_rect.getHeight()) {
m_frame_rect.LowerRightCorner.X -= m_scrollbar_width;

s32 scrollymax = getTextDimension().Height - m_frame_rect.getHeight();
Expand Down
2 changes: 1 addition & 1 deletion src/intlGUIEditBox.cpp
Expand Up @@ -1517,7 +1517,7 @@ void intlGUIEditBox::updateVScrollBar()
}

// check if a vertical scrollbar is needed ?
if (getTextDimension().Height > FrameRect.getHeight()) {
if (getTextDimension().Height > (u32) FrameRect.getHeight()) {
s32 scrollymax = getTextDimension().Height - FrameRect.getHeight();
if (scrollymax != m_vscrollbar->getMax()) {
m_vscrollbar->setMax(scrollymax);
Expand Down

0 comments on commit 1ff5c20

Please sign in to comment.