Decompile 2 functions in Source/File/FileEnumeration.cpp
Batch #12295 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_18246 EnumerateFileNames: logic confirmed by peer review - fn_18247 EnumerateFileNames: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
b2b4f926e7
commit
58f7f85d6b
1 changed files with 8 additions and 6 deletions
|
|
@ -14,11 +14,12 @@ void EnumerateFileNames(std::list<std::string>& names, const char* directory, co
|
|||
return;
|
||||
}
|
||||
|
||||
const std::string current(".");
|
||||
const std::string parent("..");
|
||||
do {
|
||||
if (found.cFileName[0] == '.' && (found.cFileName[1] == 0 || (found.cFileName[1] == '.' && found.cFileName[2] == 0))) {
|
||||
continue;
|
||||
if (current != found.cFileName && parent != found.cFileName) {
|
||||
names.push_back(std::string(found.cFileName));
|
||||
}
|
||||
names.push_back(std::string(found.cFileName));
|
||||
} while (FindNextFileA(handle, &found));
|
||||
FindClose(handle);
|
||||
}
|
||||
|
|
@ -35,11 +36,12 @@ void EnumerateFileNames(std::vector<std::string>& names, const char* directory,
|
|||
return;
|
||||
}
|
||||
|
||||
const std::string current(".");
|
||||
const std::string parent("..");
|
||||
do {
|
||||
if (found.cFileName[0] == '.' && (found.cFileName[1] == 0 || (found.cFileName[1] == '.' && found.cFileName[2] == 0))) {
|
||||
continue;
|
||||
if (current != found.cFileName && parent != found.cFileName) {
|
||||
names.push_back(std::string(found.cFileName));
|
||||
}
|
||||
names.push_back(std::string(found.cFileName));
|
||||
} while (FindNextFileA(handle, &found));
|
||||
FindClose(handle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue