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

large code cleanup #8364

Merged
merged 9 commits into from
Jan 18, 2025
Merged

large code cleanup #8364

merged 9 commits into from
Jan 18, 2025

Conversation

pixelflinger
Copy link
Collaborator

  • remove redundant qualifiers
  • use is_same_v instead of is_same
  • bring back Builder::name() for better documentation
  • add missing const parameters in implementation files
  • various cleanups

Copy link

Please add a release note line to NEW_RELEASE_NOTES.md. If this PR does not warrant a release note, add the 'internal' label to this PR.

@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Jan 17, 2025
@pixelflinger pixelflinger force-pushed the ma/fixit/cleanups branch 2 times, most recently from 040a086 to 7ebb809 Compare January 17, 2025 01:32
Copy link
Contributor

@poweifeng poweifeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm in general, but some lines seem a bit long

filament/include/filament/MaterialInstance.h Show resolved Hide resolved
@@ -147,7 +147,7 @@ static float2 find_cusp(float a, float b) noexcept {
// L = L0 * (1 - t) + t * L1;
// C = t * C1;
// a and b must be normalized so a^2 + b^2 == 1
static float find_gamut_intersection(float a, float b, float L1, float C1, float L0) noexcept {
static float find_gamut_intersection(float const a, float const b, float const L1, float const C1, float const L0) noexcept {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a really long line.

return downcast(this)->createSwapChain(nativeWindow, flags);
}

SwapChain* Engine::createSwapChain(uint32_t width, uint32_t height, uint64_t flags) noexcept {
SwapChain* Engine::createSwapChain(uint32_t const width, uint32_t const height, uint64_t const flags) noexcept {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long line

return downcast(this)->destroy(e);
}

void LightManager::setLightChannel(Instance i, unsigned int channel, bool enable) noexcept {
void LightManager::setLightChannel(Instance const i, unsigned int const channel, bool const enable) noexcept {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long line

@pixelflinger pixelflinger merged commit bef849b into main Jan 18, 2025
12 checks passed
@pixelflinger pixelflinger deleted the ma/fixit/cleanups branch January 18, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants