[VFS] Make ResolvePath argument a const reference.

This commit is contained in:
gibbed 2019-07-29 16:04:25 -05:00
parent 7c7d80103e
commit e72cacc986
7 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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

View File

@ -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() /

View File

@ -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

View File

@ -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_; }

View File

@ -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

View File

@ -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() /