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>
This commit is contained in:
Carl Woffenden 2021-01-11 20:02:21 +00:00 committed by Commit Bot service account
parent 1457ecbcaf
commit e650b38aa6
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ namespace dawn_wire { namespace client {
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();