Title: [291890] trunk/Source/WebGPU
- Revision
- 291890
- Author
- [email protected]
- Date
- 2022-03-25 14:46:51 -0700 (Fri, 25 Mar 2022)
Log Message
[WebGPU] Remove default: from switch statements, in favor of exhaustively listing all cases
https://bugs.webkit.org/show_bug.cgi?id=238305
Reviewed by Darin Adler.
This will indicate places that need fixing when new values are added.
* WebGPU/BindGroupLayout.mm:
(WebGPU::createArgumentDescriptor):
* WebGPU/Buffer.mm:
(WebGPU::Buffer::mapAsync):
* WebGPU/Instance.mm:
(WebGPU::sortedDevices):
* WebGPU/Queue.mm:
(WebGPU::Queue::writeBuffer):
Modified Paths
Diff
Modified: trunk/Source/WebGPU/ChangeLog (291889 => 291890)
--- trunk/Source/WebGPU/ChangeLog 2022-03-25 21:37:07 UTC (rev 291889)
+++ trunk/Source/WebGPU/ChangeLog 2022-03-25 21:46:51 UTC (rev 291890)
@@ -1,3 +1,21 @@
+2022-03-25 Myles C. Maxfield <[email protected]>
+
+ [WebGPU] Remove default: from switch statements, in favor of exhaustively listing all cases
+ https://bugs.webkit.org/show_bug.cgi?id=238305
+
+ Reviewed by Darin Adler.
+
+ This will indicate places that need fixing when new values are added.
+
+ * WebGPU/BindGroupLayout.mm:
+ (WebGPU::createArgumentDescriptor):
+ * WebGPU/Buffer.mm:
+ (WebGPU::Buffer::mapAsync):
+ * WebGPU/Instance.mm:
+ (WebGPU::sortedDevices):
+ * WebGPU/Queue.mm:
+ (WebGPU::Queue::writeBuffer):
+
2022-03-25 Chris Dumez <[email protected]>
Start preparing WebCore for making the String(const char*) constructor explicit
Modified: trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm (291889 => 291890)
--- trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm 2022-03-25 21:37:07 UTC (rev 291889)
+++ trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm 2022-03-25 21:46:51 UTC (rev 291890)
@@ -53,7 +53,8 @@
case WGPUBufferBindingType_Storage:
descriptor.access = MTLArgumentAccessReadWrite;
break;
- default:
+ case WGPUBufferBindingType_Undefined:
+ case WGPUBufferBindingType_Force32:
return nil;
}
return descriptor;
Modified: trunk/Source/WebGPU/WebGPU/Buffer.mm (291889 => 291890)
--- trunk/Source/WebGPU/WebGPU/Buffer.mm 2022-03-25 21:37:07 UTC (rev 291889)
+++ trunk/Source/WebGPU/WebGPU/Buffer.mm 2022-03-25 21:46:51 UTC (rev 291890)
@@ -340,7 +340,7 @@
case WGPUQueueWorkDoneStatus_DeviceLost:
callback(WGPUBufferMapAsyncStatus_DeviceLost);
return;
- default:
+ case WGPUQueueWorkDoneStatus_Force32:
callback(WGPUBufferMapAsyncStatus_Error);
return;
}
Modified: trunk/Source/WebGPU/WebGPU/Instance.mm (291889 => 291890)
--- trunk/Source/WebGPU/WebGPU/Instance.mm 2022-03-25 21:37:07 UTC (rev 291889)
+++ trunk/Source/WebGPU/WebGPU/Instance.mm 2022-03-25 21:46:51 UTC (rev 291890)
@@ -122,7 +122,7 @@
#else
return devices;
#endif
- default:
+ case WGPUPowerPreference_Force32:
return nil;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes