mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
IniFile: Provide an rvalue reference overload for SetLines
Allows moving in vectors instead of performing an unnecessary copy.
This commit is contained in:
parent
46d74a7760
commit
d8998b6392
2 changed files with 13 additions and 0 deletions
|
@ -67,6 +67,7 @@ public:
|
|||
bool Get(const std::string& key, std::vector<std::string>* values) const;
|
||||
|
||||
void SetLines(const std::vector<std::string>& lines);
|
||||
void SetLines(std::vector<std::string>&& lines);
|
||||
bool GetLines(std::vector<std::string>* lines, const bool remove_comments = true) const;
|
||||
|
||||
bool operator<(const Section& other) const { return name < other.name; }
|
||||
|
@ -124,6 +125,7 @@ public:
|
|||
bool GetKeys(const std::string& sectionName, std::vector<std::string>* keys) const;
|
||||
|
||||
void SetLines(const std::string& sectionName, const std::vector<std::string>& lines);
|
||||
void SetLines(const std::string& section_name, std::vector<std::string>&& lines);
|
||||
bool GetLines(const std::string& sectionName, std::vector<std::string>* lines,
|
||||
const bool remove_comments = true) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue