Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[impeller] Explicitly cast enum class to int before passing it to a formatted string #43139

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

CaseyHillers
Copy link
Contributor

Next version of the crosstool will start warning about this (see: llvm/llvm-project#38717)

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

…ing.

Next version of the crosstool will start warning about this (see: llvm/llvm-project#38717)
@CaseyHillers CaseyHillers requested a review from bdero June 23, 2023 09:47
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
source->GetTextureDescriptor().sample_count,
destination->GetTextureDescriptor().sample_count);
static_cast<int>(source->GetTextureDescriptor().sample_count),
static_cast<int>(destination->GetTextureDescriptor().sample_count));
Copy link
Member

@bdero bdero Jun 23, 2023

Choose a reason for hiding this comment

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

Nit: static_cast<std::underlying_type<SampleCount>>?

Copy link
Member

@bdero bdero Jun 23, 2023

Choose a reason for hiding this comment

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

I guess it makes sense to always interpret as int here. The cast should fail if it were even possible for something exotic to happen with the underlying type (won't happen).

Copy link

Choose a reason for hiding this comment

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

This should be int, since %d placeholders require an int argument.

@auto-submit auto-submit bot merged commit 060cd9c into flutter:main Jun 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2023
fluttermirroringbot pushed a commit to flutter/flutter that referenced this pull request Jun 23, 2023
…129440)

flutter/engine@cd30a48...060cd9c

2023-06-23 chillers@google.com [impeller] Explicitly cast enum class to int before passing it to a formatted string (flutter/engine#43139)
2023-06-23 54558023+keyonghan@users.noreply.github.com Add osx_sdk context to mac_clang_tidy (flutter/engine#43115)
2023-06-23 jonahwilliams@google.com [Impeller] re-enable buffer to texture blit Vulkan. (flutter/engine#43129)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@Hixie
Copy link
Contributor

Hixie commented Jun 23, 2023

test-exempt: fixes lint in newer compiler

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller needs tests
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants