Browse Source

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.
cg2121 1 year ago
parent
commit
04036f311e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UI/window-basic-status-bar.cpp

+ 2 - 0
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(