diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp index 06604ae29ea..5656cbed9bf 100644 --- a/src/mame/drivers/rungun.cpp +++ b/src/mame/drivers/rungun.cpp @@ -389,8 +389,7 @@ void rungun_state::machine_start() membank("bank2")->configure_entries(0, 8, &ROM[0x10000], 0x4000); m_banked_ram = auto_alloc_array_clear(machine(), UINT16, 0x2000); - m_pal_ram = std::make_unique(0x800*2); - memset(m_pal_ram.get(), 0, sizeof(UINT16) * 0x800 * 2); + m_pal_ram = make_unique_clear(0x800*2); membank("spriteram_bank")->configure_entries(0,2,&m_banked_ram[0],0x2000); diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp index 049dd17dcf4..13dec46c418 100644 --- a/src/mame/drivers/saturn.cpp +++ b/src/mame/drivers/saturn.cpp @@ -1209,12 +1209,9 @@ void sat_console_state::saturn_init_driver(int rgn) m_minit_boost_timeslice = attotime::zero; m_sinit_boost_timeslice = attotime::zero; - m_scu_regs = std::make_unique(0x100/4); - memset(m_scu_regs.get(), 0, sizeof(UINT32) * 0x100 / 4); - m_scsp_regs = std::make_unique(0x1000/2); - memset(m_scu_regs.get(), 0, sizeof(UINT16) * 0x1000 / 2); - m_backupram = std::make_unique(0x8000); - memset(m_scu_regs.get(), 0, sizeof(UINT8) * 0x8000); + m_scu_regs = make_unique_clear(0x100/4); + m_scsp_regs = make_unique_clear(0x1000/2); + m_backupram = make_unique_clear(0x8000); } DRIVER_INIT_MEMBER(sat_console_state,saturnus) diff --git a/src/mame/drivers/vboy.cpp b/src/mame/drivers/vboy.cpp index 2f0e15c7802..0ea093a5602 100644 --- a/src/mame/drivers/vboy.cpp +++ b/src/mame/drivers/vboy.cpp @@ -235,8 +235,7 @@ void vboy_state::video_start() m_r_frame_1 = auto_alloc_array_clear(machine(), UINT8, 0x6000); m_font = auto_alloc_array_clear(machine(), UINT16, (0x8000 >> 1)*4 * 2); - m_bgmap = std::make_unique(0x20000 >> 1); - memset(m_bgmap.get(), 0, sizeof(UINT16) * (0x20000 >> 1)); + m_bgmap = make_unique_clear(0x20000 >> 1); } void vboy_state::put_obj(bitmap_ind16 &bitmap, const rectangle &cliprect, int x, int y, UINT16 code, UINT8 pal) diff --git a/src/mame/video/k053246_k053247_k055673.cpp b/src/mame/video/k053246_k053247_k055673.cpp index fe18006cad7..fc9bc1581eb 100644 --- a/src/mame/video/k053246_k053247_k055673.cpp +++ b/src/mame/video/k053246_k053247_k055673.cpp @@ -1129,8 +1129,7 @@ void k053247_device::device_start() m_gfx = m_gfxdecode->gfx(m_gfx_num); - m_ram = std::make_unique(0x1000 / 2); - memset(m_ram.get(), 0, sizeof(UINT16) * 0x1000 / 2); + m_ram = make_unique_clear(0x1000 / 2); save_pointer(NAME(m_ram.get()), 0x1000 / 2); save_item(NAME(m_kx46_regs));