mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
CodeBlock: Get rid of implicit sign-conversion in AllocCodeSpace
Size is internally stored as a size_t, so having an int parameter would cause implicit sign-conversion from a signed value to an unsigned value to occur.
This commit is contained in:
parent
7847ca41e2
commit
9d8e8652fb
7 changed files with 19 additions and 12 deletions
|
@ -4,7 +4,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/NonCopyable.h"
|
||||
|
||||
|
@ -39,7 +42,7 @@ public:
|
|||
}
|
||||
|
||||
// Call this before you generate any code.
|
||||
void AllocCodeSpace(int size, bool need_low = true)
|
||||
void AllocCodeSpace(size_t size, bool need_low = true)
|
||||
{
|
||||
region_size = size;
|
||||
region = static_cast<u8*>(Common::AllocateExecutableMemory(region_size, need_low));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue