mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
remove unecessary PROTECT statements
Since there's no possibility of garbage collection during the lifetimes of these local variables, there's no need to protect the references.
This commit is contained in:
parent
e088fa07ae
commit
84e23659f9
@ -267,7 +267,6 @@ clone(Thread* t, object o)
|
||||
size - BytesPerWord);
|
||||
} else {
|
||||
object classNameSlash = className(t, objectClass(t, o));
|
||||
PROTECT(t, classNameSlash);
|
||||
THREAD_RUNTIME_ARRAY(t, char, classNameDot, byteArrayLength(t, classNameSlash));
|
||||
replace('/', '.', RUNTIME_ARRAY_BODY(classNameDot),
|
||||
reinterpret_cast<char*>(&byteArrayBody(t, classNameSlash, 0)));
|
||||
|
@ -3036,8 +3036,6 @@ checkCast(MyThread* t, object class_, object o)
|
||||
if (UNLIKELY(o and not isAssignableFrom(t, class_, objectClass(t, o)))) {
|
||||
object classNameFrom = className(t, objectClass(t, o));
|
||||
object classNameTo = className(t, class_);
|
||||
PROTECT(t, classNameFrom);
|
||||
PROTECT(t, classNameTo);
|
||||
THREAD_RUNTIME_ARRAY(t, char, classFrom, byteArrayLength(t, classNameFrom));
|
||||
THREAD_RUNTIME_ARRAY(t, char, classTo, byteArrayLength(t, classNameTo));
|
||||
replace('/', '.', RUNTIME_ARRAY_BODY(classFrom),
|
||||
|
Loading…
Reference in New Issue
Block a user