summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2017-09-24 13:45:58 +0100
committer smf- <smf-@users.noreply.github.com>2017-09-24 17:49:35 +0100
commitbcb4be3a5d00b3407874d580c962a964f77cbe52 (patch)
tree4165c178e9bdf33ef85f7cb23dc0d9757df8ef1b /src
parentba580ae3bf4c0d668ece4b0c4a6e0c501ea043ea (diff)
fix for clang 5 unused lambda capture errors (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/http.cpp2
-rw-r--r--src/frontend/mame/info.cpp2
-rw-r--r--src/frontend/mame/luaengine.cpp10
-rw-r--r--src/frontend/mame/ui/state.cpp2
-rw-r--r--src/lib/util/server_http_impl.hpp2
-rw-r--r--src/lib/util/server_ws_impl.hpp6
-rw-r--r--src/tools/imgtool/library.cpp2
7 files changed, 13 insertions, 13 deletions
diff --git a/src/emu/http.cpp b/src/emu/http.cpp
index d7f77474bd1..fc14b0e75ae 100644
--- a/src/emu/http.cpp
+++ b/src/emu/http.cpp
@@ -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);
diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp
index 515ce246c7a..48c4feeb5e0 100644
--- a/src/frontend/mame/info.cpp
+++ b/src/frontend/mame/info.cpp
@@ -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;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 82e3f3f50ad..610b1947210 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -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>();
diff --git a/src/frontend/mame/ui/state.cpp b/src/frontend/mame/ui/state.cpp
index 27bbe24ed00..28d47040d60 100644
--- a/src/frontend/mame/ui/state.cpp
+++ b/src/frontend/mame/ui/state.cpp
@@ -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();
});
diff --git a/src/lib/util/server_http_impl.hpp b/src/lib/util/server_http_impl.hpp
index e8b76ad2f74..4f909c023ef 100644
--- a/src/lib/util/server_http_impl.hpp
+++ b/src/lib/util/server_http_impl.hpp
@@ -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);
});
diff --git a/src/lib/util/server_ws_impl.hpp b/src/lib/util/server_ws_impl.hpp
index 35f0043ed10..cbb6f9b4908 100644
--- a/src/lib/util/server_ws_impl.hpp
+++ b/src/lib/util/server_ws_impl.hpp
@@ -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;
}
diff --git a/src/tools/imgtool/library.cpp b/src/tools/imgtool/library.cpp
index c534833da2e..9b04eecb03a 100644
--- a/src/tools/imgtool/library.cpp
+++ b/src/tools/imgtool/library.cpp
@@ -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); });
}