mirror of
https://github.com/holub/mame
synced 2025-04-20 07:22:04 +03:00
posixfile.cpp: nothrow is passed to operator new, not to reinterpret_cast.
This commit is contained in:
parent
c36ff69f33
commit
493348cd58
@ -380,7 +380,7 @@ std::unique_ptr<osd::directory::entry> osd_stat(const std::string &path)
|
||||
|
||||
// create an osd_directory_entry; be sure to make sure that the caller can
|
||||
// free all resources by just freeing the resulting osd_directory_entry
|
||||
auto const result = reinterpret_cast<osd::directory::entry *>(::operator new(sizeof(osd::directory::entry) + path.length() + 1), std::nothrow);
|
||||
auto const result = reinterpret_cast<osd::directory::entry *>(::operator new(sizeof(osd::directory::entry) + path.length() + 1, std::nothrow));
|
||||
if (!result) return nullptr;
|
||||
new (result) osd::directory::entry;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user