C++11 compatibility for @jcw
authorNick Downing <nick@ndcode.org>
Wed, 8 May 2019 12:21:59 +0000 (22:21 +1000)
committerNick Downing <nick@ndcode.org>
Wed, 8 May 2019 12:21:59 +0000 (22:21 +1000)
z180/z180.cpp

index 5b05517..9dbf644 100644 (file)
@@ -763,8 +763,13 @@ static uint8_t SZP[256];      /* zero, sign and parity flags */
 static uint8_t SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 */
 static uint8_t SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */
 
+#if 1 // std=c++11 compatibility
+static uint8_t *SZHVC_add;
+static uint8_t *SZHVC_sub;
+#else
 static std::unique_ptr<uint8_t[]> SZHVC_add;
 static std::unique_ptr<uint8_t[]> SZHVC_sub;
+#endif
 
 #include "z180ops.h"
 #include "z180tbl.h"
@@ -1941,8 +1946,13 @@ void z180_device::device_start()
        uint8_t *padd, *padc, *psub, *psbc;
 
        /* allocate big flag arrays once */
+#if 1 // std=c++11 compatibility
+       SZHVC_add = new uint8_t[2*256*256];
+       SZHVC_sub = new uint8_t[2*256*256];
+#else
        SZHVC_add = std::make_unique<uint8_t[]>(2*256*256);
        SZHVC_sub = std::make_unique<uint8_t[]>(2*256*256);
+#endif
 
        padd = &SZHVC_add[  0*256];
        padc = &SZHVC_add[256*256];