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:
parent
1457ecbcaf
commit
e650b38aa6
|
@ -83,7 +83,7 @@ namespace dawn_wire { namespace client {
|
||||||
|
|
||||||
void Device::DestroyAllObjects() {
|
void Device::DestroyAllObjects() {
|
||||||
for (auto& objectList : mObjects) {
|
for (auto& objectList : mObjects) {
|
||||||
ObjectType objectType = static_cast<ObjectType>(&objectList - mObjects.begin());
|
ObjectType objectType = static_cast<ObjectType>(&objectList - mObjects.data());
|
||||||
while (!objectList.empty()) {
|
while (!objectList.empty()) {
|
||||||
ObjectBase* object = objectList.head()->value();
|
ObjectBase* object = objectList.head()->value();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue