Skip to content

Commit

Permalink
watcher: explicit capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Oct 8, 2023
1 parent ad23f77 commit 2b92765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devel/include/wtr/watcher-/watch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class watch {
event::callback const& callback) noexcept
: watching{std::async(
std::launch::async,
[=, this]
[this, path, callback]
{
auto abs_path_ec = std::error_code{};
auto abs_path = std::filesystem::absolute(path, abs_path_ec);
Expand Down
2 changes: 1 addition & 1 deletion include/wtr/watcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ class watch {
event::callback const& callback) noexcept
: watching{std::async(
std::launch::async,
[=, this]
[this, path, callback]
{
auto abs_path_ec = std::error_code{};
auto abs_path = std::filesystem::absolute(path, abs_path_ec);
Expand Down

0 comments on commit 2b92765

Please sign in to comment.