mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
IniFile: Make Section's string constructor instances take strings by value
As the name is immediately stored into a class member, a move here is a better choice. This also moves the constructor implementations into the cpp file to avoid an otherwise unnecessary inclusion in the header. This is also likely a better choice as Section contains several non-trivial members, so this would avoid potentially inlining a bunch of setup and teardown code related to them as a side-benefit.
This commit is contained in:
@ -29,8 +29,8 @@ public:
|
||||
friend class IniFile;
|
||||
|
||||
public:
|
||||
Section() {}
|
||||
explicit Section(const std::string& name_) : name(name_) {}
|
||||
Section();
|
||||
explicit Section(std::string name_);
|
||||
bool Exists(const std::string& key) const;
|
||||
bool Delete(const std::string& key);
|
||||
|
||||
|
Reference in New Issue
Block a user