From 04036f311e76e46777c46a02c761eeb321c0ed07 Mon Sep 17 00:00:00 2001 From: cg2121 Date: Thu, 29 Feb 2024 16:49:30 -0600 Subject: [PATCH] UI: Reserve size of congestion vector This reserves the size of the congestion vector in the status bar, so it isn't resized every second. --- UI/window-basic-status-bar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UI/window-basic-status-bar.cpp b/UI/window-basic-status-bar.cpp index 5f08ba78b..5816b0f29 100644 --- a/UI/window-basic-status-bar.cpp +++ b/UI/window-basic-status-bar.cpp @@ -42,6 +42,8 @@ OBSBasicStatusBar::OBSBasicStatusBar(QWidget *parent) streamingActivePixmap(QIcon(":/res/images/streaming-active.svg") .pixmap(QSize(16, 16))) { + congestionArray.reserve(congestionUpdateSeconds); + statusWidget = new StatusBarWidget(this); statusWidget->ui->delayInfo->setText(""); statusWidget->ui->droppedFrames->setText(