From 0928a4fe915337755f2dc6738d091d0f585d3d9e Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Fri, 9 Aug 2024 18:05:59 +0200 Subject: [PATCH] Pass string as const reference in add_option --- src/interface/control_enum.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/control_enum.hpp b/src/interface/control_enum.hpp index 778a9389094..2110269fce8 100644 --- a/src/interface/control_enum.hpp +++ b/src/interface/control_enum.hpp @@ -40,7 +40,7 @@ class ControlEnum : public InterfaceControl void set_value(T value) { *m_value = value; } void bind_value(T* value) { m_value = value; } - void add_option(T key, std::string label) { m_options.push_back(std::make_pair(key, label)); } + void add_option(T key, const std::string& label) { m_options.push_back(std::make_pair(key, label)); } Rectf get_list_rect() const { return Rectf (