This avoids an “implicit capture of 'this' via '[=]' is deprecated”
warning when building for C++20 and does no harm for earlier versions.
-// Copyright (C) 2020 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2021 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
Hash::hash_fd(int fd)
{
return Util::read_fd(
- fd, [=](const void* data, size_t size) { hash(data, size); });
+ fd, [this](const void* data, size_t size) { hash(data, size); });
}
bool