Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace typedef with using #301

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/Camera3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Camera3D : public ::Camera3D {
}
};

typedef Camera3D Camera;
using Camera = Camera3D;

} // namespace raylib

Expand Down
4 changes: 3 additions & 1 deletion include/RenderTexture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ class RenderTexture : public ::RenderTexture {
depth = renderTexture.depth;
}
};
typedef RenderTexture RenderTexture2D;

using RenderTexture2D = RenderTexture;

} // namespace raylib

using RRenderTexture = raylib::RenderTexture;
Expand Down
4 changes: 2 additions & 2 deletions include/Texture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/TextureUnmanaged.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion include/Vector4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down