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:
parent
4c384d1e9f
commit
b4e15b28b6
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue