diff options
| author | comex <comexk@gmail.com> | 2014-10-28 23:38:21 -0400 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2014-10-28 23:38:21 -0400 |
| commit | 3247f28048abd8dde6f2fd08a2f279bd468084cc (patch) | |
| tree | b0ea65d02c69dbe10e79140a1a8f3da617721ae5 /Source/Core | |
| parent | 6618337ece8525f01b993820e52aed00bd5c598d (diff) | |
| parent | 56bc58b9f4518e43f9a18c16af74525ccd02b64e (diff) | |
Merge pull request #1430 from lioncash/voldir
VolumeDirectory: Pass std::string by reference for SetUniqueID/SetName
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DiscIO/VolumeDirectory.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/DiscIO/VolumeDirectory.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/VolumeDirectory.cpp b/Source/Core/DiscIO/VolumeDirectory.cpp index e0ab8acd4f..3a9e75f1d2 100644 --- a/Source/Core/DiscIO/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/VolumeDirectory.cpp @@ -152,7 +152,7 @@ std::string CVolumeDirectory::GetUniqueID() const return std::string(m_diskHeader.begin(), m_diskHeader.begin() + ID_LENGTH); } -void CVolumeDirectory::SetUniqueID(std::string id) +void CVolumeDirectory::SetUniqueID(const std::string& id) { size_t length = id.length(); if (length > 6) @@ -178,7 +178,7 @@ std::vector<std::string> CVolumeDirectory::GetNames() const return std::vector<std::string>(1, (char*)(&m_diskHeader[0x20])); } -void CVolumeDirectory::SetName(std::string name) +void CVolumeDirectory::SetName(const std::string& name) { size_t length = name.length(); if (length > MAX_NAME_LENGTH) diff --git a/Source/Core/DiscIO/VolumeDirectory.h b/Source/Core/DiscIO/VolumeDirectory.h index f32d628e58..6cfcd90004 100644 --- a/Source/Core/DiscIO/VolumeDirectory.h +++ b/Source/Core/DiscIO/VolumeDirectory.h @@ -36,12 +36,12 @@ public: bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const override; std::string GetUniqueID() const override; - void SetUniqueID(std::string _ID); + void SetUniqueID(const std::string& _ID); std::string GetMakerID() const override; std::vector<std::string> GetNames() const override; - void SetName(std::string); + void SetName(const std::string&); u32 GetFSTSize() const override; |
