UserspaceEmulator: Fix a Clang warning

Clang didn't like default construction of PartAddressableRegister,
so let's just use memset() then.
This commit is contained in:
Andreas Kling 2020-07-10 14:17:36 +02:00
commit f1801cfb28
Notes: sideshowbarker 2024-07-19 04:59:20 +09:00
2 changed files with 3 additions and 1 deletions

View file

@ -28,12 +28,14 @@
#include "Emulator.h"
#include <AK/Assertions.h>
#include <stdio.h>
#include <string.h>
namespace UserspaceEmulator {
SoftCPU::SoftCPU(Emulator& emulator)
: m_emulator(emulator)
{
memset(m_gpr, 0, sizeof(m_gpr));
}
void SoftCPU::dump() const

View file

@ -35,7 +35,7 @@ class Emulator;
union PartAddressableRegister {
struct {
u32 full_u32 { 0 };
u32 full_u32;
};
struct {
u16 low_u16;