diff --git a/Source/Core/Common/IniFile.cpp b/Source/Core/Common/IniFile.cpp index b1b9bcba6d..9023db682c 100644 --- a/Source/Core/Common/IniFile.cpp +++ b/Source/Core/Common/IniFile.cpp @@ -185,13 +185,7 @@ bool IniFile::Exists(std::string_view section_name, std::string_view key) const return section->Exists(key); } -void IniFile::SetLines(std::string_view section_name, const std::vector& lines) -{ - Section* section = GetOrCreateSection(section_name); - section->SetLines(lines); -} - -void IniFile::SetLines(std::string_view section_name, std::vector&& lines) +void IniFile::SetLines(std::string_view section_name, std::vector lines) { Section* section = GetOrCreateSection(section_name); section->SetLines(std::move(lines)); diff --git a/Source/Core/Common/IniFile.h b/Source/Core/Common/IniFile.h index 422b30aa9a..c791e546a8 100644 --- a/Source/Core/Common/IniFile.h +++ b/Source/Core/Common/IniFile.h @@ -143,8 +143,7 @@ public: bool GetKeys(std::string_view section_name, std::vector* keys) const; - void SetLines(std::string_view section_name, const std::vector& lines); - void SetLines(std::string_view section_name, std::vector&& lines); + void SetLines(std::string_view section_name, std::vector lines); bool GetLines(std::string_view section_name, std::vector* lines, bool remove_comments = true) const; diff --git a/Source/Core/Core/IOS/ES/Formats.cpp b/Source/Core/Core/IOS/ES/Formats.cpp index 8e1bea3f24..c1c815aef4 100644 --- a/Source/Core/Core/IOS/ES/Formats.cpp +++ b/Source/Core/Core/IOS/ES/Formats.cpp @@ -79,11 +79,7 @@ bool operator!=(const Content& lhs, const Content& rhs) return !operator==(lhs, rhs); } -SignedBlobReader::SignedBlobReader(const std::vector& bytes) : m_bytes(bytes) -{ -} - -SignedBlobReader::SignedBlobReader(std::vector&& bytes) : m_bytes(std::move(bytes)) +SignedBlobReader::SignedBlobReader(std::vector bytes) : m_bytes(std::move(bytes)) { } @@ -92,12 +88,7 @@ const std::vector& SignedBlobReader::GetBytes() const return m_bytes; } -void SignedBlobReader::SetBytes(const std::vector& bytes) -{ - m_bytes = bytes; -} - -void SignedBlobReader::SetBytes(std::vector&& bytes) +void SignedBlobReader::SetBytes(std::vector bytes) { m_bytes = std::move(bytes); } @@ -213,11 +204,7 @@ bool IsValidTMDSize(size_t size) return size <= 0x49e4; } -TMDReader::TMDReader(const std::vector& bytes) : SignedBlobReader(bytes) -{ -} - -TMDReader::TMDReader(std::vector&& bytes) : SignedBlobReader(std::move(bytes)) +TMDReader::TMDReader(std::vector bytes) : SignedBlobReader(std::move(bytes)) { } @@ -376,11 +363,7 @@ bool TMDReader::FindContentById(u32 id, Content* content) const return false; } -TicketReader::TicketReader(const std::vector& bytes) : SignedBlobReader(bytes) -{ -} - -TicketReader::TicketReader(std::vector&& bytes) : SignedBlobReader(std::move(bytes)) +TicketReader::TicketReader(std::vector bytes) : SignedBlobReader(std::move(bytes)) { } diff --git a/Source/Core/Core/IOS/ES/Formats.h b/Source/Core/Core/IOS/ES/Formats.h index 82b689df32..2ab6cfe6b4 100644 --- a/Source/Core/Core/IOS/ES/Formats.h +++ b/Source/Core/Core/IOS/ES/Formats.h @@ -155,12 +155,10 @@ class SignedBlobReader { public: SignedBlobReader() = default; - explicit SignedBlobReader(const std::vector& bytes); - explicit SignedBlobReader(std::vector&& bytes); + explicit SignedBlobReader(std::vector bytes); const std::vector& GetBytes() const; - void SetBytes(const std::vector& bytes); - void SetBytes(std::vector&& bytes); + void SetBytes(std::vector bytes); /// Get the SHA1 hash for this signed blob (starting at the issuer). std::array GetSha1() const; @@ -187,8 +185,7 @@ class TMDReader final : public SignedBlobReader { public: TMDReader() = default; - explicit TMDReader(const std::vector& bytes); - explicit TMDReader(std::vector&& bytes); + explicit TMDReader(std::vector bytes); bool IsValid() const; @@ -224,8 +221,7 @@ class TicketReader final : public SignedBlobReader { public: TicketReader() = default; - explicit TicketReader(const std::vector& bytes); - explicit TicketReader(std::vector&& bytes); + explicit TicketReader(std::vector bytes); bool IsValid() const; diff --git a/Source/Core/Core/SysConf.cpp b/Source/Core/Core/SysConf.cpp index 530426c129..1da871c73d 100644 --- a/Source/Core/Core/SysConf.cpp +++ b/Source/Core/Core/SysConf.cpp @@ -217,12 +217,7 @@ SysConf::Entry::Entry(Type type_, const std::string& name_) : type(type_), name( bytes.resize(GetNonArrayEntrySize(type)); } -SysConf::Entry::Entry(Type type_, const std::string& name_, const std::vector& bytes_) - : type(type_), name(name_), bytes(bytes_) -{ -} - -SysConf::Entry::Entry(Type type_, const std::string& name_, std::vector&& bytes_) +SysConf::Entry::Entry(Type type_, const std::string& name_, std::vector bytes_) : type(type_), name(name_), bytes(std::move(bytes_)) { } diff --git a/Source/Core/Core/SysConf.h b/Source/Core/Core/SysConf.h index b0ad8c2341..79de23e5c3 100644 --- a/Source/Core/Core/SysConf.h +++ b/Source/Core/Core/SysConf.h @@ -47,8 +47,7 @@ public: }; Entry(Type type_, const std::string& name_); - Entry(Type type_, const std::string& name_, const std::vector& bytes_); - Entry(Type type_, const std::string& name_, std::vector&& bytes_); + Entry(Type type_, const std::string& name_, std::vector bytes_); // Intended for use with the non array types. template