src/CMakeLists: Enforce multiple warnings on MSVC (#5692)
This commit is contained in:
parent
38b8bf12de
commit
bb05d8c12a
10 changed files with 53 additions and 30 deletions
|
@ -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:
|
||||
|
|
|
@ -705,7 +705,7 @@ static bool IsDataAvailable() {
|
|||
fd_set fd_socket;
|
||||
|
||||
FD_ZERO(&fd_socket);
|
||||
FD_SET(gdbserver_socket, &fd_socket);
|
||||
FD_SET(static_cast<u32>(gdbserver_socket), &fd_socket);
|
||||
|
||||
struct timeval t;
|
||||
t.tv_sec = 0;
|
||||
|
|
|
@ -198,7 +198,7 @@ void ExtraHID::HandleReadCalibrationDataRequest(const std::vector<u8>& request_b
|
|||
const u16 offset = Common::AlignDown(request.offset, 16);
|
||||
const u16 size = Common::AlignDown(request.size, 16);
|
||||
|
||||
if (offset + size > calibration_data.size()) {
|
||||
if (static_cast<std::size_t>(offset + size) > calibration_data.size()) {
|
||||
LOG_ERROR(Service_IR, "Read beyond the end of calibration data! (offset={}, size={})",
|
||||
offset, size);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue