From 39a42d517d26360dbf4e453657718231b0f13da9 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 9 Nov 2020 05:09:18 +1100 Subject: Got rid of a couple of easy auto_alloc_array --- docs/source/techspecs/device_memory_interface.rst | 3 ++- src/devices/video/stvvdp1.cpp | 4 ++-- src/lib/formats/tzx_cas.cpp | 2 +- src/mame/includes/saturn.h | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/source/techspecs/device_memory_interface.rst b/docs/source/techspecs/device_memory_interface.rst index 3e9356e2bd6..2eae46f3906 100644 --- a/docs/source/techspecs/device_memory_interface.rst +++ b/docs/source/techspecs/device_memory_interface.rst @@ -57,7 +57,8 @@ describing its configuration. Some examples to look up when needed: `v60_device `_ * Conditional ``AS_OPCODES``: `z80_device `_ -* Inherit configuration and add a space: m6801_device +* Inherit configuration and add a space: + `hd647180x_device `_ * Inherit configuration and modify a space: `tmpz84c011_device `_ diff --git a/src/devices/video/stvvdp1.cpp b/src/devices/video/stvvdp1.cpp index ab30fb50eae..d3fce6d03ba 100644 --- a/src/devices/video/stvvdp1.cpp +++ b/src/devices/video/stvvdp1.cpp @@ -2189,8 +2189,8 @@ int saturn_state::stv_vdp1_start ( void ) m_vdp1.framebuffer[0] = std::make_unique(1024 * 256 * 2 ); /* *2 is for double interlace */ m_vdp1.framebuffer[1] = std::make_unique(1024 * 256 * 2 ); - m_vdp1.framebuffer_display_lines = auto_alloc_array(machine(), uint16_t *, 512); - m_vdp1.framebuffer_draw_lines = auto_alloc_array(machine(), uint16_t *, 512); + m_vdp1.framebuffer_display_lines = std::make_unique(512); + m_vdp1.framebuffer_draw_lines = std::make_unique(512); m_vdp1.framebuffer_width = m_vdp1.framebuffer_height = 0; m_vdp1.framebuffer_mode = -1; diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp index 1804e89b1b6..6452faefda8 100644 --- a/src/lib/formats/tzx_cas.cpp +++ b/src/lib/formats/tzx_cas.cpp @@ -88,7 +88,7 @@ static void tzx_cas_get_blocks( const uint8_t *casdata, int caslen ) void *old_blocks = blocks; int old_max_block_count = max_block_count; max_block_count = max_block_count + BLOCK_COUNT_INCREMENTS; - blocks = (uint8_t**)malloc(max_block_count * sizeof(uint8_t*)); // SHOULD NOT BE USING auto_alloc_array() + blocks = (uint8_t**)malloc(max_block_count * sizeof(uint8_t*)); memset(blocks, 0, max_block_count); memcpy(blocks, old_blocks, old_max_block_count * sizeof(uint8_t*)); free(old_blocks); diff --git a/src/mame/includes/saturn.h b/src/mame/includes/saturn.h index a1445658ebe..b1a441875cf 100644 --- a/src/mame/includes/saturn.h +++ b/src/mame/includes/saturn.h @@ -85,7 +85,7 @@ protected: attotime m_sinit_boost_timeslice; struct { - uint16_t **framebuffer_display_lines; + std::unique_ptr framebuffer_display_lines; int framebuffer_mode; int framebuffer_double_interlace; int fbcr_accessed; @@ -96,9 +96,9 @@ protected: int framebuffer_clear_on_next_frame; rectangle system_cliprect; rectangle user_cliprect; - std::unique_ptr framebuffer[2]; - uint16_t **framebuffer_draw_lines; - std::unique_ptr gfx_decode; + std::unique_ptr framebuffer[2]; + std::unique_ptr framebuffer_draw_lines; + std::unique_ptr gfx_decode; uint16_t lopr; uint16_t copr; uint16_t ewdr; -- cgit v1.2.3