Fix C++20 deprecated lambda capture usage

This commit is contained in:
Charles Dang 2024-08-29 13:33:33 -04:00
parent 29123810fb
commit 99d43d8790
2 changed files with 3 additions and 3 deletions

View file

@ -2766,7 +2766,7 @@ void display::draw_hex(const map_location& loc)
// tod may differ from tod if hex is illuminated.
const std::string& tod_hex_mask = tod.image_mask;
if(tod_hex_mask1 || tod_hex_mask2) {
drawing_buffer_add(drawing_layer::terrain_fg, loc, [=](const rect& dest) mutable {
drawing_buffer_add(drawing_layer::terrain_fg, loc, [this](const rect& dest) mutable {
tod_hex_mask1.set_alpha_mod(tod_hex_alpha1);
draw::blit(tod_hex_mask1, dest);

View file

@ -83,7 +83,7 @@ void server_base::start_server()
#ifndef _WIN32
sighup_.async_wait(
[=](const boost::system::error_code& error, int sig)
[this](const boost::system::error_code& error, int sig)
{ this->handle_sighup(error, sig); });
#endif
}
@ -214,7 +214,7 @@ void server_base::serve(boost::asio::yield_context yield, boost::asio::ip::tcp::
void server_base::read_from_fifo() {
async_read_until(input_,
admin_cmd_, '\n',
[=](const boost::system::error_code& error, std::size_t bytes_transferred)
[this](const boost::system::error_code& error, std::size_t bytes_transferred)
{ this->handle_read_from_fifo(error, bytes_transferred); }
);
}