From e650b38aa6a8f036f78696b5be80b58768077410 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Mon, 11 Jan 2021 20:02:21 +0000 Subject: [PATCH] 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 Reviewed-by: Corentin Wallez --- src/dawn_wire/client/Device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn_wire/client/Device.cpp b/src/dawn_wire/client/Device.cpp index 0253f0aab8..767e05bab1 100644 --- a/src/dawn_wire/client/Device.cpp +++ b/src/dawn_wire/client/Device.cpp @@ -83,7 +83,7 @@ namespace dawn_wire { namespace client { void Device::DestroyAllObjects() { for (auto& objectList : mObjects) { - ObjectType objectType = static_cast(&objectList - mObjects.begin()); + ObjectType objectType = static_cast(&objectList - mObjects.data()); while (!objectList.empty()) { ObjectBase* object = objectList.head()->value();