mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-01 03:40:17 +00:00
Merge pull request #5400 from lioncash/count
fs/file: Make use of std::move where applicable
This commit is contained in:
commit
edb5977fba
1 changed files with 5 additions and 5 deletions
|
@ -219,7 +219,7 @@ void File::OpenLinkFile(Kernel::HLERequestContext& ctx) {
|
||||||
auto [server, client] = kernel.CreateSessionPair(GetName());
|
auto [server, client] = kernel.CreateSessionPair(GetName());
|
||||||
ClientConnected(server);
|
ClientConnected(server);
|
||||||
|
|
||||||
FileSessionSlot* slot = GetSessionData(server);
|
FileSessionSlot* slot = GetSessionData(std::move(server));
|
||||||
const FileSessionSlot* original_file = GetSessionData(ctx.Session());
|
const FileSessionSlot* original_file = GetSessionData(ctx.Session());
|
||||||
|
|
||||||
slot->priority = original_file->priority;
|
slot->priority = original_file->priority;
|
||||||
|
@ -265,7 +265,7 @@ void File::OpenSubFile(Kernel::HLERequestContext& ctx) {
|
||||||
auto [server, client] = kernel.CreateSessionPair(GetName());
|
auto [server, client] = kernel.CreateSessionPair(GetName());
|
||||||
ClientConnected(server);
|
ClientConnected(server);
|
||||||
|
|
||||||
FileSessionSlot* slot = GetSessionData(server);
|
FileSessionSlot* slot = GetSessionData(std::move(server));
|
||||||
slot->priority = original_file->priority;
|
slot->priority = original_file->priority;
|
||||||
slot->offset = offset;
|
slot->offset = offset;
|
||||||
slot->size = size;
|
slot->size = size;
|
||||||
|
@ -279,7 +279,7 @@ std::shared_ptr<Kernel::ClientSession> File::Connect() {
|
||||||
auto [server, client] = kernel.CreateSessionPair(GetName());
|
auto [server, client] = kernel.CreateSessionPair(GetName());
|
||||||
ClientConnected(server);
|
ClientConnected(server);
|
||||||
|
|
||||||
FileSessionSlot* slot = GetSessionData(server);
|
FileSessionSlot* slot = GetSessionData(std::move(server));
|
||||||
slot->priority = 0;
|
slot->priority = 0;
|
||||||
slot->offset = 0;
|
slot->offset = 0;
|
||||||
slot->size = backend->GetSize();
|
slot->size = backend->GetSize();
|
||||||
|
@ -289,13 +289,13 @@ std::shared_ptr<Kernel::ClientSession> File::Connect() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t File::GetSessionFileOffset(std::shared_ptr<Kernel::ServerSession> session) {
|
std::size_t File::GetSessionFileOffset(std::shared_ptr<Kernel::ServerSession> session) {
|
||||||
const FileSessionSlot* slot = GetSessionData(session);
|
const FileSessionSlot* slot = GetSessionData(std::move(session));
|
||||||
ASSERT(slot);
|
ASSERT(slot);
|
||||||
return slot->offset;
|
return slot->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t File::GetSessionFileSize(std::shared_ptr<Kernel::ServerSession> session) {
|
std::size_t File::GetSessionFileSize(std::shared_ptr<Kernel::ServerSession> session) {
|
||||||
const FileSessionSlot* slot = GetSessionData(session);
|
const FileSessionSlot* slot = GetSessionData(std::move(session));
|
||||||
ASSERT(slot);
|
ASSERT(slot);
|
||||||
return slot->size;
|
return slot->size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue