From f2951828335654d0993ead998b3c547f903501dd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 20 Dec 2015 21:49:49 -0500 Subject: 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 --- Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp') diff --git a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp index 004692999f..68b8e1b2d6 100644 --- a/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/OGL/NativeVertexFormat.cpp @@ -55,7 +55,7 @@ GLVertexFormat::GLVertexFormat(const PortableVertexDeclaration& _vtx_decl) if (vertex_stride & 3) PanicAlert("Uneven vertex stride: %i", vertex_stride); - VertexManager *vm = (OGL::VertexManager*)g_vertex_manager; + VertexManager* const vm = static_cast(g_vertex_manager.get()); glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); -- cgit v1.2.3