Преглед изворни кода

loader: Remove unnecessary constructor call in IdentifyFile()

RealVfsFile inherits from VfsFile, the instance from std::make_shared is
already compatible with the function argument type, making the copy
constructor call unnecessary.
Lioncash пре 8 година
родитељ
комит
a147fa5825
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/loader/loader.cpp

+ 1 - 1
src/core/loader/loader.cpp

@@ -42,7 +42,7 @@ FileType IdentifyFile(FileSys::VirtualFile file) {
 }
 
 FileType IdentifyFile(const std::string& file_name) {
-    return IdentifyFile(FileSys::VirtualFile(std::make_shared<FileSys::RealVfsFile>(file_name)));
+    return IdentifyFile(std::make_shared<FileSys::RealVfsFile>(file_name));
 }
 
 FileType GuessFromFilename(const std::string& name) {