Skip to content

Commit

Permalink
Pass string as const reference in add_option
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Aug 9, 2024
1 parent fefc0b0 commit 0928a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interface/control_enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 0928a4f

Please sign in to comment.