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:
parent
8753796aac
commit
6016d1e5cd
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue