From 37edcd47eed457d80e353bccfe9e601578ccca33 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 11 Jun 2021 13:31:49 +1000 Subject: Use more natural type avoiding cast and warning. --- src/ScintillaBase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 50c8e87a7..0adca2f6f 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -300,7 +300,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list rcac.bottom = static_cast(std::min(static_cast(rcac.top) + heightLB, static_cast(rcPopupBounds.bottom))); ac.lb->SetPositionRelative(rcac, &wMain); ac.lb->SetFont(vs.styles[StyleDefault].font.get()); - const unsigned int aveCharWidth = static_cast(vs.styles[StyleDefault].aveCharWidth); + const int aveCharWidth = static_cast(vs.styles[StyleDefault].aveCharWidth); ac.lb->SetAverageCharWidth(aveCharWidth); ac.lb->SetDelegate(this); @@ -311,7 +311,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list const int heightAlloced = static_cast(rcList.bottom - rcList.top); widthLB = std::max(widthLB, static_cast(rcList.right - rcList.left)); if (maxListWidth != 0) - widthLB = std::min(widthLB, static_cast(aveCharWidth)*maxListWidth); + widthLB = std::min(widthLB, aveCharWidth*maxListWidth); // Make an allowance for large strings in list rcList.left = pt.x - ac.lb->CaretFromEdge(); rcList.right = rcList.left + widthLB; -- cgit v1.2.3