Commit 8c8def09 authored by Łukasz Matysiak's avatar Łukasz Matysiak
Browse files

Use uniform initialization

parent 289ca0c0
......@@ -486,8 +486,7 @@ bool Mhwd::removeDirectory(const std::string& directory)
struct dirent *dir;
while ((dir = readdir(d)) != nullptr)
{
std::string filename = std::string(dir->d_name);
std::string filepath = directory + "/" + filename;
std::string filename {dir->d_name};
if (("." == filename) || (".." == filename) || ("" == filename))
{
......@@ -495,6 +494,7 @@ bool Mhwd::removeDirectory(const std::string& directory)
}
else
{
std::string filepath {directory + "/" + filename};
struct stat filestatus;
lstat(filepath.c_str(), &filestatus);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment