From 9d85a04b5d19923a70f0d20c6e30c4d882ed5ff7 Mon Sep 17 00:00:00 2001 From: furudbat Date: Sat, 2 Mar 2024 12:10:45 +0100 Subject: [PATCH] Replace typedef with using --- include/Camera3D.hpp | 2 +- include/RenderTexture.hpp | 4 +++- include/Texture.hpp | 4 ++-- include/TextureUnmanaged.hpp | 4 ++-- include/Vector4.hpp | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/Camera3D.hpp b/include/Camera3D.hpp index 67cd19f6..641b5158 100644 --- a/include/Camera3D.hpp +++ b/include/Camera3D.hpp @@ -129,7 +129,7 @@ class Camera3D : public ::Camera3D { } }; -typedef Camera3D Camera; +using Camera = Camera3D; } // namespace raylib diff --git a/include/RenderTexture.hpp b/include/RenderTexture.hpp index 706650d5..b47925ff 100644 --- a/include/RenderTexture.hpp +++ b/include/RenderTexture.hpp @@ -134,7 +134,9 @@ class RenderTexture : public ::RenderTexture { depth = renderTexture.depth; } }; -typedef RenderTexture RenderTexture2D; + +using RenderTexture2D = RenderTexture; + } // namespace raylib using RRenderTexture = raylib::RenderTexture; diff --git a/include/Texture.hpp b/include/Texture.hpp index ab9db518..8d665be0 100644 --- a/include/Texture.hpp +++ b/include/Texture.hpp @@ -67,8 +67,8 @@ class Texture : public TextureUnmanaged { }; // Create the Texture aliases. -typedef Texture Texture2D; -typedef Texture TextureCubemap; +using Texture2D = Texture; +using TextureCubemap = Texture; } // namespace raylib diff --git a/include/TextureUnmanaged.hpp b/include/TextureUnmanaged.hpp index 523f8a21..38994c0f 100644 --- a/include/TextureUnmanaged.hpp +++ b/include/TextureUnmanaged.hpp @@ -334,8 +334,8 @@ class TextureUnmanaged : public ::Texture { }; // Create the TextureUnmanaged aliases. -typedef TextureUnmanaged Texture2DUnmanaged; -typedef TextureUnmanaged TextureCubemapUnmanaged; +using Texture2DUnmanaged = TextureUnmanaged; +using TextureCubemapUnmanaged = TextureUnmanaged; } // namespace raylib diff --git a/include/Vector4.hpp b/include/Vector4.hpp index 6f12640f..39236ff8 100644 --- a/include/Vector4.hpp +++ b/include/Vector4.hpp @@ -171,7 +171,8 @@ class Vector4 : public ::Vector4 { }; // Alias the Vector4 as Quaternion. -typedef Vector4 Quaternion; +using Quaternion = Vector4; + } // namespace raylib using RVector4 = raylib::Vector4;