remove unnecessary std::ref(window)

This commit is contained in:
Subhraman Sarkar 2024-09-25 11:51:35 +05:30
parent f5906d6224
commit 5913cfdf55
2 changed files with 8 additions and 14 deletions

View file

@ -355,7 +355,7 @@ public:
controller_.filter();
}
void handle_copy_button_clicked(window& /*window*/)
void handle_copy_button_clicked()
{
controller_.handle_copy_button_clicked();
}
@ -387,9 +387,7 @@ public:
model_.copy_button = window.find_widget<button>("copy", false, true);
connect_signal_mouse_left_click(
*model_.copy_button,
std::bind(&view::handle_copy_button_clicked,
this,
std::ref(window)));
std::bind(&view::handle_copy_button_clicked, this));
model_.page_label = window.find_widget<styled_widget>("page_label", false, true);

View file

@ -351,8 +351,8 @@ public:
/** Bind my pointers to the widgets found in the window */
void bind(window& window);
void handle_copy_button_clicked(window & window);
void handle_clear_button_clicked(window & window);
void handle_copy_button_clicked();
void handle_clear_button_clicked();
void input_keypress_callback(bool& handled,
bool& halt,
@ -427,29 +427,25 @@ void lua_interpreter::controller::bind(window& window)
copy_button = window.find_widget<button>("copy", false, true);
connect_signal_mouse_left_click(
*copy_button,
std::bind(&lua_interpreter::controller::handle_copy_button_clicked,
this,
std::ref(window)));
std::bind(&lua_interpreter::controller::handle_copy_button_clicked, this));
clear_button = window.find_widget<button>("clear", false, true);
connect_signal_mouse_left_click(
*clear_button,
std::bind(&lua_interpreter::controller::handle_clear_button_clicked,
this,
std::ref(window)));
std::bind(&lua_interpreter::controller::handle_clear_button_clicked, this));
LOG_LUA << "Exiting lua_interpreter::controller::bind";
}
/** Copy text to the clipboard */
void lua_interpreter::controller::handle_copy_button_clicked(window & /*window*/)
void lua_interpreter::controller::handle_copy_button_clicked()
{
assert(lua_model_);
desktop::clipboard::copy_to_clipboard(lua_model_->get_raw_log());
}
/** Clear the text */
void lua_interpreter::controller::handle_clear_button_clicked(window & /*window*/)
void lua_interpreter::controller::handle_clear_button_clicked()
{
assert(lua_model_);
lua_model_->clear_log();