← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/compiler_warnings_201804 into lp:widelands

 

I have answered your question below your comment. Thanks for the review!

@bunnybot merge

Diff comments:

> 
> === modified file 'src/wui/interactive_base.cc'
> --- src/wui/interactive_base.cc	2018-04-27 13:19:15 +0000
> +++ src/wui/interactive_base.cc	2018-04-28 14:48:46 +0000
> @@ -284,8 +284,8 @@
>  	toolbar_.add(button);
>  	if (window) {
>  		window->opened.connect(
> -		   [this, button] { button->set_style(UI::Button::Style::kPermpressed); });
> -		window->closed.connect([this, button] { button->set_style(UI::Button::Style::kRaised); });
> +		   [button] { button->set_style(UI::Button::Style::kPermpressed); });
> +		window->closed.connect([button] { button->set_style(UI::Button::Style::kRaised); });

Because the contents of the lambda function:

    button->set_style(UI::Button::Style::kPermpressed);

aren't using it.

You can even have completely empty lambda captures, like this:

    [] { log("Empty lambda\n") }

>  
>  		if (bind_default_toggle) {
>  			button->sigclicked.connect(


-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler_warnings_201804/+merge/344800
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/compiler_warnings_201804.


References