summaryrefslogtreecommitdiff
path: root/core/fxge/ge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/ge')
-rw-r--r--core/fxge/ge/fx_ge_device.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/core/fxge/ge/fx_ge_device.cpp b/core/fxge/ge/fx_ge_device.cpp
index 9bb950beed..571f90cfa1 100644
--- a/core/fxge/ge/fx_ge_device.cpp
+++ b/core/fxge/ge/fx_ge_device.cpp
@@ -17,21 +17,13 @@ CFX_RenderDevice::CFX_RenderDevice()
m_Height(0),
m_bpp(0),
m_RenderCaps(0),
- m_DeviceClass(0),
- m_pDeviceDriver(nullptr) {}
+ m_DeviceClass(0) {}
-CFX_RenderDevice::~CFX_RenderDevice() {
- delete m_pDeviceDriver;
-}
-
-void CFX_RenderDevice::Flush() {
- delete m_pDeviceDriver;
- m_pDeviceDriver = nullptr;
-}
+CFX_RenderDevice::~CFX_RenderDevice() {}
-void CFX_RenderDevice::SetDeviceDriver(IFX_RenderDeviceDriver* pDriver) {
- delete m_pDeviceDriver;
- m_pDeviceDriver = pDriver;
+void CFX_RenderDevice::SetDeviceDriver(
+ std::unique_ptr<IFX_RenderDeviceDriver> pDriver) {
+ m_pDeviceDriver = std::move(pDriver);
InitDeviceInfo();
}