POSIX::readDir: Simplified handling of dirEntries

This commit is contained in:
Henry Weller
2018-09-29 10:33:50 +01:00
parent 0c866b5e10
commit de1621ee65

View File

@ -666,10 +666,6 @@ Foam::fileNameList Foam::readDir
const bool followLink
)
{
// Initial filename list size
// also used as increment if initial size found to be insufficient
static const int maxNnames = 100;
if (POSIX::debug)
{
Pout<< FUNCTION_NAME << " : reading directory " << directory << endl;
@ -679,8 +675,8 @@ Foam::fileNameList Foam::readDir
}
}
// Setup empty string list MAXTVALUES long
HashSet<fileName> dirEntries(maxNnames);
// Create empty set of file names
HashSet<fileName> dirEntries;
// Pointers to the directory entries
DIR *source;