Commit 42f36c7f authored by Lotrado's avatar Lotrado
Browse files

Removed this captures from lambdas where plog required them before fixing plog on windows.

parent 59a6fc8a
......@@ -222,7 +222,7 @@ namespace mirrage::asset {
}
}
auto add_source = [this](const char* path) {
auto add_source = [](const char* path) {
LOG(plog::info) << "Added FS directory: " << path;
if(!PHYSFS_mount(path, nullptr, 1))
throw std::system_error(static_cast<Asset_error>(PHYSFS_getLastErrorCode()),
......@@ -245,7 +245,7 @@ namespace mirrage::asset {
if(lost) {
LOG(plog::fatal) << "No archives.lst found. printing search-path...\n";
print_dir_recursiv("/", 0, [this](auto&& path) { LOG(plog::fatal) << path; });
print_dir_recursiv("/", 0, [](auto&& path) { LOG(plog::fatal) << path; });
throw std::system_error(static_cast<Asset_error>(PHYSFS_getLastErrorCode()),
"No archives.lst found.");
......
......@@ -82,7 +82,7 @@ namespace mirrage::util {
{
add("set." + name + " <value> | Sets the value of the property", std::forward<FS>(setter));
add("get." + name + " | Gets the value of the property",
[name = name, getter = std::forward<FG>(getter), this] {
[name = name, getter = std::forward<FG>(getter)] {
LOG(plog::info) << "Value of " << name << ": " << util::to_string(getter());
});
}
......@@ -121,12 +121,12 @@ namespace mirrage::util {
auto c = all_commands().emplace(
std::piecewise_construct,
std::forward_as_tuple(name),
std::forward_as_tuple(name, api, [api, f = std::forward<F>(f), this](std::string_view cmd) {
std::forward_as_tuple(name, api, [api, f = std::forward<F>(f)](std::string_view cmd) {
auto arg_iter = std::cregex_iterator(cmd.data(), cmd.data()+cmd.size(), split_args_regex);
auto arg_end = std::cregex_iterator();
util::foreach_function_arg_call(
f, [&, this](auto type) -> util::maybe<typename decltype(type)::type> {
f, [&](auto type) -> util::maybe<typename decltype(type)::type> {
if(arg_iter == arg_end) {
LOG(plog::error) << "Not enough arguments.";
return util::nothing;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment