summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pdynlib.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-03-01 07:47:51 +0100
committer couriersud <couriersud@gmx.org>2019-03-01 10:30:24 +0100
commit17fcc38a25415059e6b20d5d9b1f8c5e4ef81333 (patch)
tree1a426e73534b706dd836e9521d0126fd9fc2bed1 /src/lib/netlist/plib/pdynlib.cpp
parent2b49e6ed112e90299811437cf14524b8ec393f07 (diff)
netlist: memory code refactoring. (nw)
Diffstat (limited to 'src/lib/netlist/plib/pdynlib.cpp')
-rw-r--r--src/lib/netlist/plib/pdynlib.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/netlist/plib/pdynlib.cpp b/src/lib/netlist/plib/pdynlib.cpp
index 91e1b5cf73a..0d32bead51d 100644
--- a/src/lib/netlist/plib/pdynlib.cpp
+++ b/src/lib/netlist/plib/pdynlib.cpp
@@ -25,7 +25,7 @@ CHAR *astring_from_utf8(const char *utf8string)
// convert UTF-16 to "ANSI code page" string
char_count = WideCharToMultiByte(CP_ACP, 0, wstring, -1, nullptr, 0, nullptr, nullptr);
- result = pnew_array<CHAR>(char_count);
+ result = new CHAR[char_count];
if (result != nullptr)
WideCharToMultiByte(CP_ACP, 0, wstring, -1, result, char_count, nullptr, nullptr);
@@ -39,7 +39,7 @@ WCHAR *wstring_from_utf8(const char *utf8string)
// convert MAME string (UTF-8) to UTF-16
char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, nullptr, 0);
- result = pnew_array<WCHAR>(char_count);
+ result = new WCHAR[char_count];
if (result != nullptr)
MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count);
@@ -72,7 +72,7 @@ dynlib::dynlib(const pstring &libname)
m_isLoaded = true;
//else
// fprintf(stderr, "win: library <%s> not found!\n", libname.c_str());
- pdelete_array(buffer);
+ delete [] buffer;
#elif defined(EMSCRIPTEN)
//no-op
#else
@@ -106,7 +106,7 @@ dynlib::dynlib(const pstring &path, const pstring &libname)
{
//printf("win: library <%s> not found!\n", libname.c_str());
}
- pdelete_array(buffer);
+ delete [] buffer;
#elif defined(EMSCRIPTEN)
//no-op
#else