Commit 46c4b3d8 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Directory: Remove a useless copy

parent cec271aa
...@@ -85,7 +85,7 @@ std::string Directory::toAbsolute(const std::string& path) ...@@ -85,7 +85,7 @@ std::string Directory::toAbsolute(const std::string& path)
void Directory::read() void Directory::read()
{ {
auto dir = std::unique_ptr<DIR, int(*)(DIR*)>( opendir( m_path.c_str() ), closedir ); std::unique_ptr<DIR, int(*)(DIR*)> dir( opendir( m_path.c_str() ), closedir );
if ( dir == nullptr ) if ( dir == nullptr )
{ {
std::string err( "Failed to open directory " ); std::string err( "Failed to open directory " );
......
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