From e72cacc986c2157915e124af2c9002a42664193f Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 29 Jul 2019 16:04:25 -0500 Subject: [PATCH] [VFS] Make ResolvePath argument a const reference. --- src/xenia/vfs/device.h | 2 +- src/xenia/vfs/devices/disc_image_device.cc | 2 +- src/xenia/vfs/devices/disc_image_device.h | 2 +- src/xenia/vfs/devices/host_path_device.cc | 2 +- src/xenia/vfs/devices/host_path_device.h | 2 +- src/xenia/vfs/devices/stfs_container_device.cc | 2 +- src/xenia/vfs/devices/stfs_container_device.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/xenia/vfs/device.h b/src/xenia/vfs/device.h index b5f1ed6cb..310cc6426 100644 --- a/src/xenia/vfs/device.h +++ b/src/xenia/vfs/device.h @@ -31,7 +31,7 @@ class Device { virtual bool is_read_only() const { return true; } virtual void Dump(StringBuffer* string_buffer) = 0; - virtual Entry* ResolvePath(std::string path) = 0; + virtual Entry* ResolvePath(const std::string& path) = 0; virtual uint32_t total_allocation_units() const = 0; virtual uint32_t available_allocation_units() const = 0; diff --git a/src/xenia/vfs/devices/disc_image_device.cc b/src/xenia/vfs/devices/disc_image_device.cc index 613cafb92..025686ce0 100644 --- a/src/xenia/vfs/devices/disc_image_device.cc +++ b/src/xenia/vfs/devices/disc_image_device.cc @@ -54,7 +54,7 @@ void DiscImageDevice::Dump(StringBuffer* string_buffer) { root_entry_->Dump(string_buffer, 0); } -Entry* DiscImageDevice::ResolvePath(std::string path) { +Entry* DiscImageDevice::ResolvePath(const std::string& path) { // The filesystem will have stripped our prefix off already, so the path will // be in the form: // some\PATH.foo diff --git a/src/xenia/vfs/devices/disc_image_device.h b/src/xenia/vfs/devices/disc_image_device.h index 8b3273947..9b26a74a2 100644 --- a/src/xenia/vfs/devices/disc_image_device.h +++ b/src/xenia/vfs/devices/disc_image_device.h @@ -29,7 +29,7 @@ class DiscImageDevice : public Device { bool Initialize() override; void Dump(StringBuffer* string_buffer) override; - Entry* ResolvePath(std::string path) override; + Entry* ResolvePath(const std::string& path) override; uint32_t total_allocation_units() const override { return uint32_t(mmap_->size() / sectors_per_allocation_unit() / diff --git a/src/xenia/vfs/devices/host_path_device.cc b/src/xenia/vfs/devices/host_path_device.cc index 1347cd8ec..e61d2a6c0 100644 --- a/src/xenia/vfs/devices/host_path_device.cc +++ b/src/xenia/vfs/devices/host_path_device.cc @@ -48,7 +48,7 @@ void HostPathDevice::Dump(StringBuffer* string_buffer) { root_entry_->Dump(string_buffer, 0); } -Entry* HostPathDevice::ResolvePath(std::string path) { +Entry* HostPathDevice::ResolvePath(const std::string& path) { // The filesystem will have stripped our prefix off already, so the path will // be in the form: // some\PATH.foo diff --git a/src/xenia/vfs/devices/host_path_device.h b/src/xenia/vfs/devices/host_path_device.h index 751092b91..d000a43a3 100644 --- a/src/xenia/vfs/devices/host_path_device.h +++ b/src/xenia/vfs/devices/host_path_device.h @@ -27,7 +27,7 @@ class HostPathDevice : public Device { bool Initialize() override; void Dump(StringBuffer* string_buffer) override; - Entry* ResolvePath(std::string path) override; + Entry* ResolvePath(const std::string& path) override; bool is_read_only() const override { return read_only_; } diff --git a/src/xenia/vfs/devices/stfs_container_device.cc b/src/xenia/vfs/devices/stfs_container_device.cc index b93173319..728bba7c5 100644 --- a/src/xenia/vfs/devices/stfs_container_device.cc +++ b/src/xenia/vfs/devices/stfs_container_device.cc @@ -149,7 +149,7 @@ void StfsContainerDevice::Dump(StringBuffer* string_buffer) { root_entry_->Dump(string_buffer, 0); } -Entry* StfsContainerDevice::ResolvePath(std::string path) { +Entry* StfsContainerDevice::ResolvePath(const std::string& path) { // The filesystem will have stripped our prefix off already, so the path will // be in the form: // some\PATH.foo diff --git a/src/xenia/vfs/devices/stfs_container_device.h b/src/xenia/vfs/devices/stfs_container_device.h index 9819084f0..4ca6618e9 100644 --- a/src/xenia/vfs/devices/stfs_container_device.h +++ b/src/xenia/vfs/devices/stfs_container_device.h @@ -171,7 +171,7 @@ class StfsContainerDevice : public Device { bool Initialize() override; void Dump(StringBuffer* string_buffer) override; - Entry* ResolvePath(std::string path) override; + Entry* ResolvePath(const std::string& path) override; uint32_t total_allocation_units() const override { return uint32_t(mmap_total_size_ / sectors_per_allocation_unit() /