From 9f0b827df13bff9c6d9b95e2dae72a1c3102b239 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Mon, 4 Jan 2021 13:28:29 +0000 Subject: [PATCH] Minor fix to build with MSVC: Removes constructor ambiguity Fixes error C2440: 'return': cannot convert from 'dawn_native::Aspect' to 'Result' Change-Id: Ia63ced7fe9582c88a4173db008226733bdd06cac Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36080 Reviewed-by: Kai Ninomiya Reviewed-by: Corentin Wallez Commit-Queue: Carl Woffenden --- src/dawn_native/CommandValidation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dawn_native/CommandValidation.cpp b/src/dawn_native/CommandValidation.cpp index bf7da687d8..9d4124cf5b 100644 --- a/src/dawn_native/CommandValidation.cpp +++ b/src/dawn_native/CommandValidation.cpp @@ -655,7 +655,8 @@ namespace dawn_native { switch (view.aspect) { case wgpu::TextureAspect::All: if (HasOneBit(format.aspects)) { - return Aspect{format.aspects}; + Aspect single = format.aspects; + return single; } else { return DAWN_VALIDATION_ERROR( "A single aspect must be selected for multi-planar formats in "