< prev index next >

src/hotspot/share/gc/z/zArray.inline.hpp

Print this page

        

@@ -99,11 +99,11 @@
     _next(0) {}
 
 template <typename T, bool parallel>
 inline bool ZArrayIteratorImpl<T, parallel>::next(T* elem) {
   if (parallel) {
-    const size_t next = Atomic::add(1u, &_next) - 1u;
+    const size_t next = Atomic::add(&_next, 1u) - 1u;
     if (next < _array->size()) {
       *elem = _array->at(next);
       return true;
     }
   } else {
< prev index next >