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

Simplify some C++ abstractions #1518

Merged
merged 10 commits into from
Sep 26, 2024
Merged

Simplify some C++ abstractions #1518

merged 10 commits into from
Sep 26, 2024

Conversation

Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Sep 25, 2024

Only RGBGFX was using namespaces, and not in consistent ways. (For example, packing and sorting were namespace equivalents of the snake_case prefixes used in the other programs, but detail was for "private" templates in headers, and optimized/unoptimized were kind of arbitrary.) So this just removes them entirely.

This avoids potentially referring to values/functions in two ways (namespace-qualified, or unqualified in their "own" file), or worse, the same name in two namespaces (e.g. outputTileData).

This also removes or reduces usage of some other C++ abstractions (using, friend) when they're not necessary.

@Rangi42 Rangi42 added the refactoring This PR is intended to clean up code more than change functionality label Sep 25, 2024
@Rangi42 Rangi42 merged commit 9783671 into gbdev:master Sep 26, 2024
22 checks passed
@Rangi42 Rangi42 deleted the namespaces branch September 26, 2024 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring This PR is intended to clean up code more than change functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant