mirror of
https://github.com/corda/corda.git
synced 2025-01-27 14:49:35 +00:00
simplify byteArrayEqual()
This commit is contained in:
parent
8d7cd5482f
commit
375715fb72
10
src/vm.cpp
10
src/vm.cpp
@ -630,13 +630,9 @@ hash(const int8_t* s, unsigned length)
|
||||
bool
|
||||
byteArrayEqual(Thread* t, object a, object b)
|
||||
{
|
||||
if (a == b) return true;
|
||||
|
||||
if (byteArrayLength(t, a) == byteArrayLength(t, b)) {
|
||||
return strcmp(byteArrayBody(t, a), byteArrayBody(t, b)) == 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return a == b or
|
||||
((byteArrayLength(t, a) == byteArrayLength(t, b)) and
|
||||
strcmp(byteArrayBody(t, a), byteArrayBody(t, b)) == 0);
|
||||
}
|
||||
|
||||
object
|
||||
|
Loading…
x
Reference in New Issue
Block a user