Don't clear memory before constructing devices, with the exception of drivers for now.

This substantially reduces the overhead of running -validate, -romident,
etc. and brings us a little closer to not needing to disable lifetime
dead store elimination optimisations.  There are likely to be some
issues that weren't fixed while this was still on a branch, so everyone
be alert.
This commit is contained in:
Vas Crabb 2020-09-28 18:01:02 +10:00
parent e706c64e28
commit 5d32cad8ca

View File

@ -205,7 +205,7 @@ private:
template <typename DeviceClass>
static std::unique_ptr<device_t> create_device(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
{
return make_unique_clear<DeviceClass>(mconfig, tag, owner, clock);
return std::make_unique<DeviceClass>(mconfig, tag, owner, clock);
}
template <typename DriverClass>
@ -298,7 +298,7 @@ public:
template <typename... Params>
std::unique_ptr<DeviceClass> create(machine_config &mconfig, char const *tag, device_t *owner, Params &&... args) const
{
return make_unique_clear<DeviceClass>(mconfig, tag, owner, std::forward<Params>(args)...);
return std::make_unique<DeviceClass>(mconfig, tag, owner, std::forward<Params>(args)...);
}
template <typename... Params> DeviceClass &operator()(machine_config &mconfig, char const *tag, Params &&... args) const;