mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
Rename Constant::As to Constant::ValueAs.
This CL updates Constant::As to be Constant::ValueAs. Now that Constant inherits from CastableBase, there is already an As method on CastableBase. This makes the override inside Constant confusing and potentially incorrect. Bug: tint:1718 Change-Id: I4f73971801e95225a99a5a993124c04194d0d7d6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114360 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
35842190ef
commit
5addefb148
@@ -62,7 +62,7 @@ class Constant : public Castable<Constant, Node> {
|
||||
|
||||
/// @returns the value of the constant as the given scalar or abstract value.
|
||||
template <typename T>
|
||||
T As() const {
|
||||
T ValueAs() const {
|
||||
return std::visit(
|
||||
[](auto v) {
|
||||
if constexpr (std::is_same_v<decltype(v), std::monostate>) {
|
||||
|
||||
Reference in New Issue
Block a user