plugins/mousemark: correct reserve size.

verts is now QVector<QVector2D>. So don't reserve 2x the size.

This ammends commit 617f3b9000.
This commit is contained in:
Yifan Zhu 2024-03-29 07:52:18 -07:00 committed by Vlad Zahorodnii
parent 4c384d1e9f
commit b4e15b28b6

View file

@ -125,7 +125,7 @@ void MouseMarkEffect::paintScreen(const RenderTarget &renderTarget, const Render
QList<QVector2D> verts;
for (const Mark &mark : std::as_const(marks)) {
verts.clear();
verts.reserve(mark.size() * 2);
verts.reserve(mark.size());
for (const QPointF &p : std::as_const(mark)) {
verts.push_back(QVector2D(p.x() * scale, p.y() * scale));
}
@ -134,7 +134,7 @@ void MouseMarkEffect::paintScreen(const RenderTarget &renderTarget, const Render
}
if (!drawing.isEmpty()) {
verts.clear();
verts.reserve(drawing.size() * 2);
verts.reserve(drawing.size());
for (const QPointF &p : std::as_const(drawing)) {
verts.push_back(QVector2D(p.x() * scale, p.y() * scale));
}