mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8301072
: Replace NULL with nullptr in share/oops/
Reviewed-by: stefank, coleenp, dholmes
This commit is contained in:
parent
1c7b09bc23
commit
c8ace482ed
56 changed files with 1080 additions and 1080 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -86,7 +86,7 @@ void oopDesc::print_value_on(outputStream* st) const {
|
|||
|
||||
|
||||
void oopDesc::verify_on(outputStream* st, oopDesc* oop_desc) {
|
||||
if (oop_desc != NULL) {
|
||||
if (oop_desc != nullptr) {
|
||||
oop_desc->klass()->oop_verify_on(oop_desc, st);
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
|
|||
|
||||
// used only for asserts and guarantees
|
||||
bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) {
|
||||
return obj == NULL ? true : is_oop(obj, ignore_mark_word);
|
||||
return obj == nullptr ? true : is_oop(obj, ignore_mark_word);
|
||||
}
|
||||
|
||||
VerifyOopClosure VerifyOopClosure::verify_oop;
|
||||
|
@ -160,7 +160,7 @@ void oopDesc::set_narrow_klass(narrowKlass nk) {
|
|||
void* oopDesc::load_klass_raw(oop obj) {
|
||||
if (UseCompressedClassPointers) {
|
||||
narrowKlass narrow_klass = obj->_metadata._compressed_klass;
|
||||
if (narrow_klass == 0) return NULL;
|
||||
if (narrow_klass == 0) return nullptr;
|
||||
return (void*)CompressedKlassPointers::decode_raw(narrow_klass);
|
||||
} else {
|
||||
return obj->_metadata._klass;
|
||||
|
@ -171,7 +171,7 @@ void* oopDesc::load_oop_raw(oop obj, int offset) {
|
|||
uintptr_t addr = (uintptr_t)(void*)obj + (uint)offset;
|
||||
if (UseCompressedOops) {
|
||||
narrowOop narrow_oop = *(narrowOop*)addr;
|
||||
if (CompressedOops::is_null(narrow_oop)) return NULL;
|
||||
if (CompressedOops::is_null(narrow_oop)) return nullptr;
|
||||
return (void*)CompressedOops::decode_raw(narrow_oop);
|
||||
} else {
|
||||
return *(void**)addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue