diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index 94963f870..6d2a1b9cb 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -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(); diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index eec9723ff..3cbbad8e2 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -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;