-
Notifications
You must be signed in to change notification settings - Fork 6k
[impeller] Explicitly cast enum class to int before passing it to a formatted string #43139
Conversation
…ing. Next version of the crosstool will start warning about this (see: llvm/llvm-project#38717)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
source->GetTextureDescriptor().sample_count, | ||
destination->GetTextureDescriptor().sample_count); | ||
static_cast<int>(source->GetTextureDescriptor().sample_count), | ||
static_cast<int>(destination->GetTextureDescriptor().sample_count)); |
There was a problem hiding this comment.
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>>
?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
… it to a formatted string (flutter/engine#43139)
…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
test-exempt: fixes lint in newer compiler |
Next version of the crosstool will start warning about this (see: llvm/llvm-project#38717)
Pre-launch Checklist
///
).