mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
fix for clang 5 unused lambda capture errors (nw)
This commit is contained in:
parent
ba580ae3bf
commit
bcb4be3a5d
@ -272,7 +272,7 @@ http_manager::http_manager(bool active, short port, const char *root)
|
||||
|
||||
auto& endpoint = m_wsserver->m_endpoint["/"];
|
||||
|
||||
m_server->on_get([this, root](auto response, auto request) {
|
||||
m_server->on_get([root](auto response, auto request) {
|
||||
std::string doc_root = root;
|
||||
|
||||
auto request_impl = std::make_shared<http_request_impl>(request);
|
||||
|
@ -224,7 +224,7 @@ void info_xml_creator::output(FILE *out, std::vector<std::string> const &pattern
|
||||
driver_enumerator drivlist(m_lookup_options);
|
||||
std::vector<bool> matched(patterns.size(), false);
|
||||
size_t exact_matches = 0;
|
||||
auto const included = [&patterns, &drivlist, &matched, &exact_matches] (char const *const name) -> bool
|
||||
auto const included = [&patterns, &matched, &exact_matches] (char const *const name) -> bool
|
||||
{
|
||||
if (patterns.empty())
|
||||
return true;
|
||||
|
@ -923,7 +923,7 @@ void lua_engine::initialize()
|
||||
*/
|
||||
|
||||
emu.new_usertype<context>("thread", sol::call_constructor, sol::constructors<sol::types<>>(),
|
||||
"start", [this](context &ctx, const char *scr) {
|
||||
"start", [](context &ctx, const char *scr) {
|
||||
std::string script(scr);
|
||||
if(ctx.busy)
|
||||
return false;
|
||||
@ -962,13 +962,13 @@ void lua_engine::initialize()
|
||||
th.detach();
|
||||
return true;
|
||||
},
|
||||
"continue", [this](context &ctx, const char *val) {
|
||||
"continue", [](context &ctx, const char *val) {
|
||||
if(!ctx.yield)
|
||||
return;
|
||||
ctx.result = val;
|
||||
ctx.sync.notify_all();
|
||||
},
|
||||
"result", sol::property([this](context &ctx) -> std::string {
|
||||
"result", sol::property([](context &ctx) -> std::string {
|
||||
if(ctx.busy && !ctx.yield)
|
||||
return "";
|
||||
return ctx.result;
|
||||
@ -1008,7 +1008,7 @@ void lua_engine::initialize()
|
||||
}
|
||||
return sol::make_object(sol(), ret);
|
||||
},
|
||||
"read_block", [this](save_item &item, int offset, sol::buffer *buff) {
|
||||
"read_block", [](save_item &item, int offset, sol::buffer *buff) {
|
||||
if(!item.base || ((offset + buff->get_len()) > (item.size * item.count)))
|
||||
buff->set_len(0);
|
||||
else
|
||||
@ -1267,7 +1267,7 @@ void lua_engine::initialize()
|
||||
* debug:wplist(space)[] - table of watchpoints
|
||||
*/
|
||||
sol().registry().new_usertype<device_debug>("device_debug", "new", sol::no_constructor,
|
||||
"step", [this](device_debug &dev, sol::object num) {
|
||||
"step", [](device_debug &dev, sol::object num) {
|
||||
int steps = 1;
|
||||
if(num.is<int>())
|
||||
steps = num.as<int>();
|
||||
|
@ -175,7 +175,7 @@ void menu_load_save_state_base::populate(float &customtop, float &custombottom)
|
||||
std::sort(
|
||||
m_entries_vec.begin(),
|
||||
m_entries_vec.end(),
|
||||
[this](const file_entry *a, const file_entry *b)
|
||||
[](const file_entry *a, const file_entry *b)
|
||||
{
|
||||
return a->last_modified() > b->last_modified();
|
||||
});
|
||||
|
@ -220,7 +220,7 @@ namespace webpp {
|
||||
|
||||
///Use this function if you need to recursively send parts of a longer message
|
||||
void send(const std::shared_ptr<Response> &response, const std::function<void(const std::error_code&)>& callback=nullptr) const {
|
||||
asio::async_write(*response->socket(), response->m_streambuf, [this, response, callback](const std::error_code& ec, size_t /*bytes_transferred*/) {
|
||||
asio::async_write(*response->socket(), response->m_streambuf, [response, callback](const std::error_code& ec, size_t /*bytes_transferred*/) {
|
||||
if(callback)
|
||||
callback(ec);
|
||||
});
|
||||
|
@ -282,7 +282,7 @@ namespace webpp {
|
||||
else
|
||||
header_stream->put(static_cast<unsigned char>(length));
|
||||
|
||||
connection->strand.post([this, connection, header_stream, message_stream, callback]() {
|
||||
connection->strand.post([connection, header_stream, message_stream, callback]() {
|
||||
connection->send_queue.emplace_back(header_stream, message_stream, callback);
|
||||
if(connection->send_queue.size()==1)
|
||||
connection->send_from_queue(connection);
|
||||
@ -493,7 +493,7 @@ namespace webpp {
|
||||
//Close connection if unmasked message from client (protocol error)
|
||||
if(first_bytes[1]<128) {
|
||||
const std::string reason("message from client not masked");
|
||||
send_close(connection, 1002, reason, [this, connection](const std::error_code& /*ec*/) {});
|
||||
send_close(connection, 1002, reason, [connection](const std::error_code& /*ec*/) {});
|
||||
connection_close(connection, endpoint, 1002, reason);
|
||||
return;
|
||||
}
|
||||
@ -586,7 +586,7 @@ namespace webpp {
|
||||
}
|
||||
|
||||
auto reason=message->string();
|
||||
send_close(connection, status, reason, [this, connection](const std::error_code& /*ec*/) {});
|
||||
send_close(connection, status, reason, [connection](const std::error_code& /*ec*/) {});
|
||||
connection_close(connection, endpoint, status, reason);
|
||||
return;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ library::modulelist::iterator library::find(const std::string &module_name)
|
||||
return std::find_if(
|
||||
m_modules.begin(),
|
||||
m_modules.end(),
|
||||
[this, module_name](std::unique_ptr<imgtool_module> &module) { return !module_name.compare(module->name); });
|
||||
[module_name](std::unique_ptr<imgtool_module> &module) { return !module_name.compare(module->name); });
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user