Common/Watches: std::move strings where applicable

Allows calling code to move the std::string into the Watch instances,
avoiding copies.
This commit is contained in:
Lioncash
2019-07-08 17:28:07 -04:00
parent 0a7395bfba
commit bc8778203e
7 changed files with 35 additions and 35 deletions

View File

@ -24,19 +24,19 @@ struct Watch
std::string name;
State is_enabled;
Watch(u32 address, const std::string& name, State is_enabled);
Watch(u32 address, std::string name, State is_enabled);
};
class Watches
{
public:
std::size_t SetWatch(u32 address, const std::string& name);
std::size_t SetWatch(u32 address, std::string name);
const Watch& GetWatch(std::size_t index) const;
const std::vector<Watch>& GetWatches() const;
void UnsetWatch(u32 address);
void UpdateWatch(std::size_t index, u32 address, const std::string& name);
void UpdateWatch(std::size_t index, u32 address, std::string name);
void UpdateWatchAddress(std::size_t index, u32 address);
void UpdateWatchName(std::size_t index, const std::string& name);
void UpdateWatchName(std::size_t index, std::string name);
void EnableWatch(std::size_t index);
void DisableWatch(std::size_t index);
bool HasEnabledWatch(u32 address) const;