tint: Fix unused-but-set-parameter warning

Bug: dawn:1608
Change-Id: I49575fc34f162be4b046ac479459c554a563bcca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113080
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Jason Erb 2022-12-06 19:37:38 +00:00 committed by Dawn LUCI CQ
parent 8753796aac
commit 6016d1e5cd
1 changed files with 2 additions and 4 deletions

View File

@ -573,14 +573,12 @@ constexpr int IndexOfDefaultCase() {
/// then the case handler is called. /// then the case handler is called.
/// @returns true if a case handler was found, otherwise false. /// @returns true if a case handler was found, otherwise false.
template <typename T, typename RETURN_TYPE, typename... CASES> template <typename T, typename RETURN_TYPE, typename... CASES>
inline bool NonDefaultCases(T* object, inline bool NonDefaultCases([[maybe_unused]] T* object,
const TypeInfo* type, const TypeInfo* type,
RETURN_TYPE* result, [[maybe_unused]] RETURN_TYPE* result,
std::tuple<CASES...>&& cases) { std::tuple<CASES...>&& cases) {
using Cases = std::tuple<CASES...>; using Cases = std::tuple<CASES...>;
(void)result; // Not always used, avoid warning.
static constexpr bool kHasReturnType = !std::is_same_v<RETURN_TYPE, void>; static constexpr bool kHasReturnType = !std::is_same_v<RETURN_TYPE, void>;
static constexpr size_t kNumCases = sizeof...(CASES); static constexpr size_t kNumCases = sizeof...(CASES);