src/CMakeLists: Enforce multiple warnings on MSVC (#5692)
This commit is contained in:
@@ -45,7 +45,7 @@ void CheatEngine::AddCheat(const std::shared_ptr<CheatBase>& cheat) {
|
||||
cheats_list.push_back(cheat);
|
||||
}
|
||||
|
||||
void CheatEngine::RemoveCheat(int index) {
|
||||
void CheatEngine::RemoveCheat(std::size_t index) {
|
||||
std::unique_lock<std::shared_mutex> lock(cheats_list_mutex);
|
||||
if (index < 0 || index >= static_cast<int>(cheats_list.size())) {
|
||||
LOG_ERROR(Core_Cheats, "Invalid index {}", index);
|
||||
@@ -54,7 +54,7 @@ void CheatEngine::RemoveCheat(int index) {
|
||||
cheats_list.erase(cheats_list.begin() + index);
|
||||
}
|
||||
|
||||
void CheatEngine::UpdateCheat(int index, const std::shared_ptr<CheatBase>& new_cheat) {
|
||||
void CheatEngine::UpdateCheat(std::size_t index, const std::shared_ptr<CheatBase>& new_cheat) {
|
||||
std::unique_lock<std::shared_mutex> lock(cheats_list_mutex);
|
||||
if (index < 0 || index >= static_cast<int>(cheats_list.size())) {
|
||||
LOG_ERROR(Core_Cheats, "Invalid index {}", index);
|
||||
|
@@ -29,8 +29,8 @@ public:
|
||||
void Connect();
|
||||
std::vector<std::shared_ptr<CheatBase>> GetCheats() const;
|
||||
void AddCheat(const std::shared_ptr<CheatBase>& cheat);
|
||||
void RemoveCheat(int index);
|
||||
void UpdateCheat(int index, const std::shared_ptr<CheatBase>& new_cheat);
|
||||
void RemoveCheat(std::size_t index);
|
||||
void UpdateCheat(std::size_t index, const std::shared_ptr<CheatBase>& new_cheat);
|
||||
void SaveCheatFile() const;
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user