Browse Source

Use static_cast in GetImpl_*()

1vanK 3 years ago
parent
commit
57131ce024
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/Urho3D/Graphics/Graphics.h

+ 3 - 3
Source/Urho3D/Graphics/Graphics.h

@@ -359,7 +359,7 @@ public:
     GraphicsImpl_OGL* GetImpl_OGL() const
     GraphicsImpl_OGL* GetImpl_OGL() const
     {
     {
         assert(Graphics::GetGAPI() == GAPI_OPENGL);
         assert(Graphics::GetGAPI() == GAPI_OPENGL);
-        return (GraphicsImpl_OGL*)impl_;
+        return static_cast<GraphicsImpl_OGL*>(impl_);
     }
     }
 #endif
 #endif
 
 
@@ -368,7 +368,7 @@ public:
     GraphicsImpl_D3D9* GetImpl_D3D9() const
     GraphicsImpl_D3D9* GetImpl_D3D9() const
     {
     {
         assert(Graphics::GetGAPI() == GAPI_D3D9);
         assert(Graphics::GetGAPI() == GAPI_D3D9);
-        return (GraphicsImpl_D3D9*)impl_;
+        return static_cast<GraphicsImpl_D3D9*>(impl_);
     }
     }
 #endif
 #endif
 
 
@@ -377,7 +377,7 @@ public:
     GraphicsImpl_D3D11* GetImpl_D3D11() const
     GraphicsImpl_D3D11* GetImpl_D3D11() const
     {
     {
         assert(Graphics::GetGAPI() == GAPI_D3D11);
         assert(Graphics::GetGAPI() == GAPI_D3D11);
-        return (GraphicsImpl_D3D11*)impl_;
+        return static_cast<GraphicsImpl_D3D11*>(impl_);
     }
     }
 #endif
 #endif