summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-11-09 05:09:18 +1100
committer Vas Crabb <vas@vastheman.com>2020-11-09 05:09:18 +1100
commit39a42d517d26360dbf4e453657718231b0f13da9 (patch)
treef9f8443c074a52db70c5953a4a4f3ed0e7c88752
parentabd5378a1638a5f78e5678b2ffa0802b4aded0e9 (diff)
Got rid of a couple of easy auto_alloc_array
-rw-r--r--docs/source/techspecs/device_memory_interface.rst3
-rw-r--r--src/devices/video/stvvdp1.cpp4
-rw-r--r--src/lib/formats/tzx_cas.cpp2
-rw-r--r--src/mame/includes/saturn.h8
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 <https://git.redump.net/mame/tree/src/devices/cpu/v60/v60.cpp?h=mame0226>`_
* Conditional ``AS_OPCODES``:
`z80_device <https://git.redump.net/mame/tree/src/devices/cpu/z80/z80.cpp?h=mame0226>`_
-* Inherit configuration and add a space: m6801_device
+* Inherit configuration and add a space:
+ `hd647180x_device <https://git.redump.net/mame/tree/src/devices/cpu/z180/hd647180x.cpp?h=mame0226>`_
* Inherit configuration and modify a space:
`tmpz84c011_device <https://git.redump.net/mame/tree/src/devices/cpu/z80/tmpz84c011.cpp?h=mame0226>`_
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<uint16_t[]>(1024 * 256 * 2 ); /* *2 is for double interlace */
m_vdp1.framebuffer[1] = std::make_unique<uint16_t[]>(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<uint16_t * []>(512);
+ m_vdp1.framebuffer_draw_lines = std::make_unique<uint16_t * []>(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<uint16_t * []> 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<uint16_t[]> framebuffer[2];
- uint16_t **framebuffer_draw_lines;
- std::unique_ptr<uint8_t[]> gfx_decode;
+ std::unique_ptr<uint16_t []> framebuffer[2];
+ std::unique_ptr<uint16_t * []> framebuffer_draw_lines;
+ std::unique_ptr<uint8_t []> gfx_decode;
uint16_t lopr;
uint16_t copr;
uint16_t ewdr;