mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-11-23 14:40:14 +00:00
Merge pull request #3614 from Sonicadvance1/remove_temporary_allocation
FEXServer: Removes temporary variable allocation
This commit is contained in:
commit
cd249e2c3a
@ -338,7 +338,7 @@ void HandleSocketData(int Socket) {
|
||||
break;
|
||||
}
|
||||
case FEXServerClient::PacketType::TYPE_GET_ROOTFS_PATH: {
|
||||
fextl::string MountFolder = SquashFS::GetMountFolder();
|
||||
const fextl::string& MountFolder = SquashFS::GetMountFolder();
|
||||
|
||||
FEXServerClient::FEXServerResultPacket Res {
|
||||
.MountPath {
|
||||
@ -357,7 +357,7 @@ void HandleSocketData(int Socket) {
|
||||
.iov_len = sizeof(Res),
|
||||
},
|
||||
{
|
||||
.iov_base = MountFolder.data(),
|
||||
.iov_base = const_cast<char*>(MountFolder.data()),
|
||||
.iov_len = MountFolder.size(),
|
||||
},
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ bool InitializeSquashFS() {
|
||||
return true;
|
||||
}
|
||||
|
||||
fextl::string GetMountFolder() {
|
||||
const fextl::string& GetMountFolder() {
|
||||
return MountFolder;
|
||||
}
|
||||
} // namespace SquashFS
|
||||
|
@ -5,5 +5,5 @@
|
||||
namespace SquashFS {
|
||||
bool InitializeSquashFS();
|
||||
void UnmountRootFS();
|
||||
fextl::string GetMountFolder();
|
||||
const fextl::string& GetMountFolder();
|
||||
} // namespace SquashFS
|
||||
|
Loading…
Reference in New Issue
Block a user