From 038557ba69ee3720800a5ae3821c64d1c60e2724 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sat, 28 Nov 2020 12:59:07 +0100 Subject: [PATCH] Fix bad use of constexpr. --- src/gui/ToolTip.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/ToolTip.cxx b/src/gui/ToolTip.cxx index a887e0096..12ede067a 100644 --- a/src/gui/ToolTip.cxx +++ b/src/gui/ToolTip.cxx @@ -123,12 +123,13 @@ void ToolTip::release(bool emptyTip) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void ToolTip::show(const string& tip) { + uInt32 maxRows = MAX_ROWS; myTipPos = myMousePos; uInt32 maxWidth = std::min(myWidth - myTextXOfs * 2, uInt32(myFont->getStringWidth(tip))); mySurface->fillRect(1, 1, maxWidth + myTextXOfs * 2 - 2, myHeight - 2, kWidColor); - int lines = std::min(MAX_ROWS, + int lines = std::min(maxRows, uInt32(mySurface->drawString(*myFont, tip, myTextXOfs, myTextYOfs, maxWidth, myHeight - myTextYOfs * 2, kTextColor)));