From 38886e703ff27ca426ec80de6efcc6ac3dc045dc Mon Sep 17 00:00:00 2001 From: bad code <> Date: Sun, 22 Sep 2024 16:44:02 +0200 Subject: [PATCH] Avoid unnecessary copy of vector --- src/btop_menu.cpp | 2 +- src/btop_menu.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index 3d721a8..6a47e29 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -798,7 +798,7 @@ namespace Menu { }; msgBox::msgBox() {} - msgBox::msgBox(int width, int boxtype, vector content, string title) + msgBox::msgBox(int width, int boxtype, const vector& content, string title) : width(width), boxtype(boxtype) { auto tty_mode = Config::getB("tty_mode"); auto rounded = Config::getB("rounded_corners"); diff --git a/src/btop_menu.hpp b/src/btop_menu.hpp index 63974e4..3b02837 100644 --- a/src/btop_menu.hpp +++ b/src/btop_menu.hpp @@ -61,7 +61,7 @@ namespace Menu { Select }; msgBox(); - msgBox(int width, int boxtype, vector content, string title); + msgBox(int width, int boxtype, const vector& content, string title); //? Draw and return box as a string string operator()();