mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-31 17:41:16 +00:00
Improved casting of limits for std::distance in stack linear chart view.
This commit is contained in:
@@ -905,8 +905,8 @@ int StackLinearChartView::findXIndexByPosition(
|
||||
const auto nearestXPercentageIt = ((right) > (left)) ? (it - 1) : it;
|
||||
return std::clamp(
|
||||
std::distance(begin(chartData.xPercentage), nearestXPercentageIt),
|
||||
long(localStart),
|
||||
long(localEnd));
|
||||
std::ptrdiff_t(localStart),
|
||||
std::ptrdiff_t(localEnd));
|
||||
}
|
||||
|
||||
AbstractChartView::HeightLimits StackLinearChartView::heightLimits(
|
||||
|
||||
Reference in New Issue
Block a user