diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-12-20 21:49:49 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-12-20 22:40:37 -0500 |
| commit | f2951828335654d0993ead998b3c547f903501dd (patch) | |
| tree | acf56e852bc06711f07382821f9d115fea060b00 /Source/UnitTests/TestUtils/StubHost.cpp | |
| parent | 1fbab188adafaf46e252837153cbfa3242a8d3c7 (diff) | |
VideoBackends: Simplify initialization and deinitialization of resources
Approximately three or four times now, the issue of pointers being
in an inconsistent state been an issue in the video backend renderers
with regards to tripping up other developers.
Global (ugh) resources are put into a unique_ptr and will always have a
well-defined state of being - null or not null
Diffstat (limited to 'Source/UnitTests/TestUtils/StubHost.cpp')
| -rw-r--r-- | Source/UnitTests/TestUtils/StubHost.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/UnitTests/TestUtils/StubHost.cpp b/Source/UnitTests/TestUtils/StubHost.cpp index 2cf0d60396..ac83093b9f 100644 --- a/Source/UnitTests/TestUtils/StubHost.cpp +++ b/Source/UnitTests/TestUtils/StubHost.cpp @@ -5,6 +5,7 @@ // Stub implementation of the Host_* callbacks for tests. These implementations // do nothing except return default values when required. +#include <memory> #include <string> #include "Common/GL/GLInterfaceBase.h" @@ -26,4 +27,4 @@ bool Host_RendererIsFullscreen() { return false; } void Host_ConnectWiimote(int, bool) {} void Host_SetWiiMoteConnectionState(int) {} void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {} -cInterfaceBase* HostGL_CreateGLInterface() { return nullptr; } +std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface() { return nullptr; } |
