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:
Lioncash
2017-01-07 18:10:39 -05:00
parent 7847ca41e2
commit 9d8e8652fb
7 changed files with 19 additions and 12 deletions

View File

@ -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));