mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-01 00:12:55 +00:00
filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
Avoids unnecessary atomic reference count incrementing and decrementing
This commit is contained in:
parent
abbf038191
commit
5da4c78c6a
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
|
@ -30,7 +32,7 @@ static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
|
||||||
}
|
}
|
||||||
|
|
||||||
VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_)
|
VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_)
|
||||||
: backing(backing_) {}
|
: backing(std::move(backing_)) {}
|
||||||
|
|
||||||
std::string VfsDirectoryServiceWrapper::GetName() const {
|
std::string VfsDirectoryServiceWrapper::GetName() const {
|
||||||
return backing->GetName();
|
return backing->GetName();
|
||||||
|
|
Loading…
Reference in a new issue