mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-23 21:40:04 +00:00
Resolve some type conversion warnings
This commit is contained in:
parent
2696add2fd
commit
1df939469a
@ -102,7 +102,7 @@ void CheatEngine::LoadCheatFile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheatEngine::RunCallback([[maybe_unused]] u64 userdata, int cycles_late) {
|
void CheatEngine::RunCallback([[maybe_unused]] u64 userdata, s64 cycles_late) {
|
||||||
{
|
{
|
||||||
std::shared_lock<std::shared_mutex> lock(cheats_list_mutex);
|
std::shared_lock<std::shared_mutex> lock(cheats_list_mutex);
|
||||||
for (auto& cheat : cheats_list) {
|
for (auto& cheat : cheats_list) {
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void LoadCheatFile();
|
void LoadCheatFile();
|
||||||
void RunCallback(u64 userdata, int cycles_late);
|
void RunCallback(u64 userdata, s64 cycles_late);
|
||||||
std::vector<std::shared_ptr<CheatBase>> cheats_list;
|
std::vector<std::shared_ptr<CheatBase>> cheats_list;
|
||||||
mutable std::shared_mutex cheats_list_mutex;
|
mutable std::shared_mutex cheats_list_mutex;
|
||||||
Core::TimingEventType* event;
|
Core::TimingEventType* event;
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
namespace FileSys::Patch {
|
namespace FileSys::Patch {
|
||||||
|
|
||||||
bool ApplyIpsPatch(const std::vector<u8>& ips, std::vector<u8>& buffer) {
|
bool ApplyIpsPatch(const std::vector<u8>& ips, std::vector<u8>& buffer) {
|
||||||
u32 cursor = 5;
|
std::size_t cursor = 5;
|
||||||
u32 patch_length = ips.size() - 3;
|
std::size_t patch_length = ips.size() - 3;
|
||||||
std::string ips_header(ips.begin(), ips.begin() + 5);
|
std::string ips_header(ips.begin(), ips.begin() + 5);
|
||||||
|
|
||||||
if (ips_header != "PATCH") {
|
if (ips_header != "PATCH") {
|
||||||
@ -30,7 +30,7 @@ bool ApplyIpsPatch(const std::vector<u8>& ips, std::vector<u8>& buffer) {
|
|||||||
if (eof_check == "EOF")
|
if (eof_check == "EOF")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
u32 offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
std::size_t offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
||||||
std::size_t length = ips[cursor + 3] << 8 | ips[cursor + 4];
|
std::size_t length = ips[cursor + 3] << 8 | ips[cursor + 4];
|
||||||
|
|
||||||
// check for an rle record
|
// check for an rle record
|
||||||
|
Loading…
Reference in New Issue
Block a user