Minor fix to build with MSVC: Gets content address instead of iterator
Fixes error C2679: binary '-': no operator found which takes a right-hand operand of type 'std::_Array_iterator<_Ty,23>' (or there is no acceptable conversion)
Change-Id: I566b05032da5f68674156eae2901a3f3e7a8acbb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36082
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_wire/client/Device.cpp b/src/dawn_wire/client/Device.cpp
index 0253f0a..767e05b 100644
--- a/src/dawn_wire/client/Device.cpp
+++ b/src/dawn_wire/client/Device.cpp
@@ -83,7 +83,7 @@
void Device::DestroyAllObjects() {
for (auto& objectList : mObjects) {
- ObjectType objectType = static_cast<ObjectType>(&objectList - mObjects.begin());
+ ObjectType objectType = static_cast<ObjectType>(&objectList - mObjects.data());
while (!objectList.empty()) {
ObjectBase* object = objectList.head()->value();