Skip to content

Commit

Permalink
Merge pull request #20491 from LinHu2016/coding-std-update4
Browse files Browse the repository at this point in the history
Clean up ClassStaticsIterator class
  • Loading branch information
dmitripivkine authored Nov 1, 2024
2 parents 64b29d5 + ca57331 commit 732aefd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions runtime/gc_structs/ClassStaticsIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
class GC_ClassStaticsIterator
{
U_32 _objectStaticCount;
uint32_t _objectStaticCount;
j9object_t *_staticPtr;

public:
Expand Down Expand Up @@ -104,13 +104,12 @@ class GC_ClassStaticsIterator
volatile j9object_t *
nextSlot()
{
j9object_t *slotPtr;
j9object_t *slotPtr = NULL;

if (0 == _objectStaticCount) {
return NULL;
if (0 != _objectStaticCount) {
_objectStaticCount -= 1;
slotPtr = _staticPtr++;
}
_objectStaticCount -= 1;
slotPtr = _staticPtr++;

return slotPtr;
}
Expand Down

0 comments on commit 732aefd

Please sign in to comment.