Skip to content

Commit

Permalink
Clean up ClassStaticsIterator class
Browse files Browse the repository at this point in the history
Use consistent data types and code formatting

Signed-off-by: lhu <linhu@ca.ibm.com>
  • Loading branch information
LinHu2016 committed Nov 1, 2024
1 parent 1fb0961 commit ca57331
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 ca57331

Please sign in to comment.