summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/xavix2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/xavix2.cpp')
-rw-r--r--src/mame/drivers/xavix2.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mame/drivers/xavix2.cpp b/src/mame/drivers/xavix2.cpp
index 7d17e36658f..bb0f3d638df 100644
--- a/src/mame/drivers/xavix2.cpp
+++ b/src/mame/drivers/xavix2.cpp
@@ -313,12 +313,12 @@ void xavix2_state::gpu1_trigger_w(u8 data)
void xavix2_state::gpu_update(u16 count, u16 adr)
{
- int *list = new int[count];
+ std::unique_ptr<int []> list(new int[count]);
for(u32 i=0; i != count; i++) {
u64 command = m_maincpu->space(AS_PROGRAM).read_qword(adr + 8*i);
list[i] = (command & 0x1fe00000) | i;
}
- std::sort(list, list + count, std::greater<int>());
+ std::sort(list.get(), list.get() + count, std::greater<int>());
for(u32 i=0; i != count; i++) {
u64 command = m_maincpu->space(AS_PROGRAM).read_qword(adr + 8*(list[i] & 0xffff));
logerror("gpu %02d: %016x x=%03x y=%03x ?=%02x ?=%x s=%02x w=%02x h=%02x c=%04x %s\n",
@@ -370,7 +370,6 @@ void xavix2_state::gpu_update(u16 count, u16 adr)
}
}
}
- delete[] list;
}
void xavix2_state::gpu_descsize_w(u16 data)