Merge branch 'master' into jgrpp
Remove 'byte' typedef
This commit is contained in:
@@ -310,11 +310,11 @@ static const char *GetAccessViolationTypeString(uint type)
|
||||
|
||||
buffer += seprintf(buffer, last, "\n Bytes at instruction pointer:\n");
|
||||
#ifdef _M_AMD64
|
||||
byte *b = (byte*)ep->ContextRecord->Rip;
|
||||
uint8_t *b = (uint8_t*)ep->ContextRecord->Rip;
|
||||
#elif defined(_M_IX86)
|
||||
byte *b = (byte*)ep->ContextRecord->Eip;
|
||||
uint8_t *b = (uint8_t*)ep->ContextRecord->Eip;
|
||||
#elif defined(_M_ARM64)
|
||||
byte *b = (byte*)ep->ContextRecord->Pc;
|
||||
uint8_t *b = (uint8_t*)ep->ContextRecord->Pc;
|
||||
#endif
|
||||
for (int i = 0; i != 24; i++) {
|
||||
if (IsBadReadPtr(b, 1)) {
|
||||
|
||||
@@ -224,7 +224,7 @@ void Win32FontCache::ClearFontCache()
|
||||
if (width > MAX_GLYPH_DIM || height > MAX_GLYPH_DIM) usererror("Font glyph is too large");
|
||||
|
||||
/* Call GetGlyphOutline again with size to actually render the glyph. */
|
||||
byte *bmp = AllocaM(byte, size);
|
||||
uint8_t *bmp = AllocaM(uint8_t, size);
|
||||
GetGlyphOutline(this->dc, key, GGO_GLYPH_INDEX | (aa ? GGO_GRAY8_BITMAP : GGO_BITMAP), &gm, size, bmp, &mat);
|
||||
|
||||
/* GDI has rendered the glyph, now we allocate a sprite and copy the image into it. */
|
||||
@@ -339,11 +339,11 @@ static bool TryLoadFontFromFile(const std::string &font_name, LOGFONT &logfont)
|
||||
/* Try to query an array of LOGFONTs that describe the file. */
|
||||
DWORD len = 0;
|
||||
if (GetFontResourceInfo(fontPath, &len, nullptr, 2) && len >= sizeof(LOGFONT)) {
|
||||
LOGFONT *buf = (LOGFONT *)new byte[len];
|
||||
LOGFONT *buf = (LOGFONT *)new uint8_t[len];
|
||||
if (GetFontResourceInfo(fontPath, &len, buf, 2)) {
|
||||
logfont = *buf; // Just use first entry.
|
||||
}
|
||||
delete[](byte *)buf;
|
||||
delete[](uint8_t *)buf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user