diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-10-18 16:34:54 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-10-18 16:35:19 +0200 |
commit | 50d72b357081ba377dac4c0d841ad55be3ae9fad (patch) | |
tree | 7becb8931a76969bc966d4435b43c9e42c4a2018 /src/init.cpp | |
parent | a1d78b59fc03aa4376519b6f2d886c5c729b5618 (diff) | |
parent | f4c4e388843a9cf5fd4a289b1d6bce8eab6b2ce6 (diff) |
Merge #11495: [trivial] Make namespace explicit for is_regular_file
f4c4e38 [trivial] Make namespace explicit for is_regular_file (John Newbery)
Pull request description:
is_regular_file resolves using argument dependent lookup. Make the
namespace explicit so it's obvious where the function is defined.
For those not familiar with argument dependent lookups:
- http://en.cppreference.com/w/cpp/language/adl
- https://en.wikipedia.org/wiki/Argument-dependent_name_lookup
Thanks to C++ guru @ryanofsky for pointing this out to me.
Tree-SHA512: 919f1818081a8f90c5751181f87e13b06d90f8aec0ab873100434e55c85cca6e0e288ecc7f135e19e9b5dba7952e96b6393864b7840e20b69dd40e92a157928b
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index f63ad7f5d3..6557434880 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -588,7 +588,7 @@ void CleanupBlockRevFiles() LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n"); fs::path blocksdir = GetDataDir() / "blocks"; for (fs::directory_iterator it(blocksdir); it != fs::directory_iterator(); it++) { - if (is_regular_file(*it) && + if (fs::is_regular_file(*it) && it->path().filename().string().length() == 12 && it->path().filename().string().substr(8,4) == ".dat") { |