fixed potential Clang warnings

This commit is contained in:
thrust26 2020-11-19 16:44:03 +01:00
parent 8f0547f995
commit 8b4ed1ae08
2 changed files with 4 additions and 4 deletions

View File

@ -179,14 +179,14 @@ Common::Point TiaOutputWidget::getToolTipIndex(const Common::Point& pos) const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string TiaOutputWidget::getToolTip(const Common::Point& pos) const
{
Common::Point idx = getToolTipIndex(pos);
const Common::Point& idx = getToolTipIndex(pos);
if(idx.x < 0)
return EmptyString;
uInt32 height = instance().console().tia().height();
const uInt32 height = instance().console().tia().height();
// limit to 274 lines (PAL default without scaling)
uInt32 yStart = height <= FrameManager::Metrics::baseHeightPAL
const uInt32 yStart = height <= FrameManager::Metrics::baseHeightPAL
? 0 : (height - FrameManager::Metrics::baseHeightPAL) >> 1;
const Int32 i = idx.x + (yStart + idx.y) * instance().console().tia().width();
uInt8* tiaOutputBuffer = instance().console().tia().outputBuffer();

View File

@ -296,7 +296,7 @@ Common::Point TiaZoomWidget::getToolTipIndex(const Common::Point& pos) const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string TiaZoomWidget::getToolTip(const Common::Point& pos) const
{
Common::Point idx = getToolTipIndex(pos);
const Common::Point& idx = getToolTipIndex(pos);
if(idx.x < 0)
return EmptyString;