From a147fa5825cdcc3d0c776856f44133ed72b3d773 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 23 Jul 2018 17:44:55 -0400 Subject: 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. --- src/core/loader/loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/loader') diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 4cbd9e285..cbc4177c6 100644 --- a/src/core/loader/loader.cpp +++ b/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(file_name))); + return IdentifyFile(std::make_shared(file_name)); } FileType GuessFromFilename(const std::string& name) { -- cgit v1.2.3