Fix minor warnings reported by gcc and clang.

This commit is contained in:
Stephen Anthony 2018-08-06 17:29:22 -02:30
parent 2406b8ad0f
commit a424b8b9a7
7 changed files with 15 additions and 10 deletions

View File

@ -635,12 +635,13 @@ void DataGridWidget::drawWidget(bool hilite)
{ {
if(_changedList[pos]) if(_changedList[pos])
{ {
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kDbgChangedColor : _bgcolorlo); s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
onTop ? uInt32(kDbgChangedColor) : _bgcolorlo);
if(_hiliteList[pos]) if(_hiliteList[pos])
textColor = kDbgColorHi; textColor = kDbgColorHi;
else else
textColor = onTop ? kDbgChangedTextColor : textColor; textColor = onTop ? uInt32(kDbgChangedTextColor) : textColor;
} }
else if(_hiliteList[pos]) else if(_hiliteList[pos])
textColor = kDbgColorHi; textColor = kDbgColorHi;

View File

@ -96,7 +96,7 @@ void PromptWidget::drawWidget(bool hilite)
else else
fgcolor = c >> 8; fgcolor = c >> 8;
s.drawChar(_font, c & 0x7f, x, y, onTop ? fgcolor : kColor); s.drawChar(_font, c & 0x7f, x, y, onTop ? fgcolor : uInt32(kColor));
x += _kConsoleCharWidth; x += _kConsoleCharWidth;
} }
y += _kConsoleLineHeight; y += _kConsoleLineHeight;

View File

@ -514,7 +514,7 @@ void RomListWidget::drawWidget(bool hilite)
// Draw labels // Draw labels
s.drawString(_font, dlist[pos].label, xpos, ypos, _labelWidth, s.drawString(_font, dlist[pos].label, xpos, ypos, _labelWidth,
dlist[pos].hllabel ? textColor : kColor); dlist[pos].hllabel ? textColor : uInt32(kColor));
// Bytes are only editable if they represent code, graphics, or accessible data // Bytes are only editable if they represent code, graphics, or accessible data
// Otherwise, the disassembly should get all remaining space // Otherwise, the disassembly should get all remaining space

View File

@ -115,11 +115,13 @@ void ToggleBitWidget::drawWidget(bool hilite)
// Highlight changes // Highlight changes
if(_changedList[pos]) if(_changedList[pos])
{ {
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kDbgChangedColor : _bgcolorlo); s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
onTop ? uInt32(kDbgChangedColor) : _bgcolorlo);
s.drawString(_font, buffer, x, y, _colWidth, onTop ? kDbgChangedTextColor : kColor); s.drawString(_font, buffer, x, y, _colWidth, onTop ? kDbgChangedTextColor : kColor);
} }
else else
s.drawString(_font, buffer, x, y, _colWidth, onTop ? textColor : kColor); s.drawString(_font, buffer, x, y, _colWidth,
onTop ? textColor : uInt32(kColor));
} }
else else
{ {

View File

@ -137,7 +137,8 @@ void CheckListWidget::drawWidget(bool hilite)
TextAlign::Left, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
} }
else else
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), onTop ? textColor : kColor); s.drawString(_font, _list[pos], _x + r.left, y, r.width(),
onTop ? textColor : uInt32(kColor));
} }
// Only draw the caret while editing, and if it's in the current viewport // Only draw the caret while editing, and if it's in the current viewport

View File

@ -96,7 +96,7 @@ void EditTextWidget::drawWidget(bool hilite)
s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(), s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(),
_changed && onTop _changed && onTop
? uInt32(kDbgChangedTextColor) ? uInt32(kDbgChangedTextColor)
: onTop ? _textcolor : kColor, : onTop ? _textcolor : uInt32(kColor),
TextAlign::Left, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
// Draw the caret // Draw the caret

View File

@ -645,8 +645,9 @@ void CheckboxWidget::drawWidget(bool hilite)
if(_drawBox) if(_drawBox)
s.frameRect(_x, _y + _boxY, 14, 14, onTop && hilite && isEnabled() && isEditable() ? kWidColorHi : kColor); s.frameRect(_x, _y + _boxY, 14, 14, onTop && hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
// Do we draw a square or cross? // Do we draw a square or cross?
s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? onTop ? uInt32(kDbgChangedColor) : kDlgColor s.fillRect(_x + 1, _y + _boxY + 1, 12, 12,
: isEnabled() ? onTop ? _bgcolor : kDlgColor : uInt32(kColor)); _changed ? onTop ? uInt32(kDbgChangedColor) : uInt32(kDlgColor) :
isEnabled() ? onTop ? _bgcolor : uInt32(kDlgColor) : uInt32(kColor));
if(_state) if(_state)
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, onTop && isEnabled() ? hilite && isEditable() ? kWidColorHi : kCheckColor s.drawBitmap(_img, _x + 2, _y + _boxY + 2, onTop && isEnabled() ? hilite && isEditable() ? kWidColorHi : kCheckColor
: kColor, 10); : kColor, 10);